Skip to content

Latest commit

 

History

History
431 lines (304 loc) · 14 KB

README.md

File metadata and controls

431 lines (304 loc) · 14 KB

Contributors Forks Stargazers Issues MIT License

LinkedIn


Docker-Logo Docker-Compose-Logo Kubernetes-Logo

Navisite

Hey !!
In This Repo We are going to Learn Some Docker, Docker-Compose And Kubernetes together
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Repository
  2. Getting Started
  3. Usage
  4. RoadMap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Repository

Product Name Screen Shot

(back to top)

Built With

List of major frameworks/libraries used to bootstrap this project.

  • Docker
  • Linux
  • Kubernetes
  • Nginx
  • .NET
  • Postgres

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

1. Installing Docker and Docker-Compose

  • Note 1: Replace version with the latest version number from the Docker Engine - Community repository.

  • Note 2: For X86_64 Architecture CPUs use amd64 in place of arch if you are using a different architecture than x86_64, you can find the correct arch by running uname -m on your machine.

    • In Ubuntu

      1. Update Your apt

        sudo apt-get update
      2. Download Docker Desktop for Ubuntu

        wget https://desktop.docker.com/linux/main/amd64/docker-desktop-<version>-<arch>.deb
      3. Installing Docker Desktop

        sudo apt install ./docker-desktop-<version>-<arch>.deb
    • In Arch Linux

      1. Update Your Pacman

        sudo pacman -Syu
      2. Downloading and Installing Docker and Docker-Compose Plugin for Arch

        sudo pacman -S docker docker-compose
    • In Windows Command Prompt

      1. Download Docker Desktop With This Command

        Invoke-WebRequest https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe
      2. Type Command Below For installing Docker Desktop

        start /w "" "Docker Desktop Installer.exe" install

Installation

installing and setting up the app

  1. Clone the repo

    git clone https://github.com/msadeqsirjani/Navisite.git
  2. Install ... packages

    ... install

(back to top)

Usage

For more examples, please refer to the Documentation

(back to top)

Roadmap

Phase (1)

  1. Choose a Web-Server image from Docker Hub (Like: Nginx, Apache, etc.)

    • Nginx is the one we are going to use in this project.
    • Downloading WebServer Image From Docker Hub
      • Downloading Nginx Image From Docker Hub
  2. Writing Dockerfile For WebServer That Do One of these Tasks :

    1. Acting as Reverse Proxy for a simple application.

    2. Hosting an HTML Page.

  • Note : First Task Can Have Extra Points For Architecture and Richer Configuration

    1. WebServer must be able to host a Content of a Folder Outside of the Container

      • Writing Dockerfile that can host a Content of a Folder Outside of the Container
    2. Choosing a way of Configuring the WebServer (Like: copying in image, mounting a volume, etc.)

      • ... is the one we are going to use in this project.
  1. Choose a Database image from Docker Hub (Like: Elasticsearch, MySQL, MongoDB, etc.)

    • PostgreSQL is the one we are going to use in this project.
    • Downloading Database Image From Docker Hub
      • Downloading PostgreSQL Image From Docker Hub
  • Note : The related image configuration must written in docker-compose.yml file that have these four features :

    1. The Configuration file must be Stateful (Meaning that the data will be saved even if the container is removed)

    2. Each container must use Limited amount of resources (Like: CPU, Memory, etc.)

    3. For choosen database Define a separate username and password

    4. Need to run automatically after each system restart.

    • Downloading The Database Image From Docker Hub
    • The Related image Configuration must write
  1. By using Pervious Step Dockerfile do the build opration note that both images must run together

    • Writing docker-compose.yml File
  2. Push the built image to Docker Hub

    • Pushing The Built Image To Docker Hub
    • Putting Docker Hub Image Link In issue Phase 1

Phase (2)

In this phase, we plan to launch a self-hosted version of kubernetes together. We suggest you minikube.

  1. At first, as always, we apply the update command

sudo apt-get update
  1. At first, as always, we apply the update command

sudo apt-get install curl
  1. In continuation of the previous case, the binary installation files are downloaded from the domains with the http tag, and what is better is to enter the following command as well.

sudo apt-get install apt-transport-https
  1. As you know, to install minikube, you must use the hypervisor feature and install a version of virtual box on your operating system. This can be done as follows

sudo apt install virtualbox virtualbox-ext-packs
  1. In this step, we download the minikube installation binary files

wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
  1. In order to be able to apply the commands related to the execution of minikube, we must move the executable files to the following path.

sudo cp minikube-linux-amd64 /usr/local/bin/minikube
  1. We give the necessary access to the executable files of minikube as follows.

sudo chmod 755 /usr/local/bin/minikube
  1. Now we have installed minikube and we can enter the following command in the command line to check the correctness of the program installation.

minikube version
  1. There are 3 ways to communicate with minikube. The most important and powerful method is to use command line commands or kubectl

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl

With the above command, we download the kubectl binary installation files.

  1. The necessary access to the kubectl executable is given as follows

chmod +x ./kubectl
  1. We move the kubectl execution file to the execution path of other programs.

sudo mv ./kubectl /usr/local/bin/kubectl
  1. We have now installed kubectl. We can make sure of the correct performance by executing the following command

kubectl version -o json
  1. By running the following command, minikube will run on a virtualbox

minikube start
  1. You can connect to minikube using kubectl using the following commands

kubectl config view
kubectl cluster-info
kubectl get nodes
  1. At the end, you can get the necessary information from the latest status of minikube with the following command

minikube status

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Mohammad Sadeq Sirjani - @msadeqsirjani - m.sadeq.sirjani@gmail.com

Project Link: https://github.com/msadeqsirjani/Navisite

(back to top)

Acknowledgments

(back to top)