From 3ec12667415a794d60589a776897b5db497ad475 Mon Sep 17 00:00:00 2001 From: Jiwant Singh Date: Thu, 24 Dec 2020 22:35:32 -0500 Subject: [PATCH 1/3] Add Vagrant Setup for Windows Installation --- documentation/windows-setup-new.md | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 documentation/windows-setup-new.md diff --git a/documentation/windows-setup-new.md b/documentation/windows-setup-new.md new file mode 100644 index 0000000..09413cc --- /dev/null +++ b/documentation/windows-setup-new.md @@ -0,0 +1,42 @@ +## Setup Vagrant on Windows + +1. Setup `VirtualBox`. Vagrant requires VirtualBox to create Virtual Machine. Navigate to https://www.virtualbox.org/wiki/Downloads to Download Virtual Box. + +2. Setup `Vagrant`. Navigate to https://www.vagrantup.com/downloads to download latest version of Vagrant. + +3. Setup `Putty`. Navigate to https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html to download latest version of putty. + + +## Connect to Cloud VM from your Local Windows Machine using Port Forwarding Technique. + +Requirements: +- Putty + +### Steps + +1. Nagivate to C:\Windows\System32\drivers\etc + +2. Open the `host` file by right clicking and editing with either a text editor or notepad. +![Step2](images/Setup1.PNG) + +3. Add these lines to the `host` file: +``` +127.0.0.1 localhost +127.0.0.1 klocalhost +``` +![Step3](images/Setup2.PNG) + +4. Open Putty. Here you will need to create a session. Under `Host Name (or IP address)` supply your [username]@[IP of VM] with Port 22. +![Step4](images/Setup3.PNG) + +5. On the left-hand navigation bar, expand `SSH` and click on `Auth`. Supply your SSH key you used to create the VM. +![Step5](images/Setup4.PNG) + +6. Open up `Tunnels` below `SSH` and add: +`Source Port: 80 Destination: klocalhost:80` +`Source Port: 8080 Destination: localhost:80` +![Step6](images/Setup5.PNG) + +7. Save your session as you may need/want to reuse it. + +8. After saving the session, you can now `load` it and `open` which will connect you to the VM. From 9b77c034b634d9ed7fc9af5d6caa5339ee714140 Mon Sep 17 00:00:00 2001 From: Jiwant Singh Date: Thu, 24 Dec 2020 22:49:34 -0500 Subject: [PATCH 2/3] Add Vagrant Documentation for Mac Installation Add Vagrant Documentation for Linux Installation Add Vagrant Setup Guidelines to quickstart-vagrant.md Rename refrences to windows-setup.md as putty-setup.md Add Setup KAT notes to README.md Add Notes for Vagrant Commands Align Main Image in Center Add Heading to Main Image Add changes to labelling Minor Changes Add Uniformity to Deploy Table Fix Links for remote server Add vagrant resume command --- README.md | 17 +++++--- documentation/cloudvm.md | 4 +- .../{windows-setup.md => putty-setup.md} | 2 +- documentation/quickstart-vagrant.md | 16 +++++-- documentation/vagrant-setup.md | 24 +++++++++++ documentation/windows-setup-new.md | 42 ------------------- 6 files changed, 52 insertions(+), 53 deletions(-) rename documentation/{windows-setup.md => putty-setup.md} (83%) create mode 100644 documentation/vagrant-setup.md delete mode 100644 documentation/windows-setup-new.md diff --git a/README.md b/README.md index a26e18c..9c312ca 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -
-BigBitBus KAT components -
+
+

BigBitBus KAT Components

+ BigBitBus KAT components -**Components of the BigBitBus KAT application code. Click on the diagram to enlarge, or follow [this link](documentation/) for detailed documentation** + +**Click on the diagram to enlarge, or follow [this link](documentation/) for detailed documentation** +
# Introduction @@ -16,7 +18,6 @@ Most components of the Kubernetes cloud native ecosystem are extremely well docu From here, we recommend you start with a [review of some Kubernetes and related concepts](./documentation/) we have put together. Or, if you want to directly go to the code and examples you can navigate the folders in the repository, the table below will launch you right in. - # What is where? | Category | File or Directory | Description | @@ -28,6 +29,12 @@ From here, we recommend you start with a [review of some Kubernetes and related | Monitoring | [code/k8s-common-code/monitoring](code/k8s-common-code/monitoring) |Installing and configuring monitoring with Prometheus and Grafana into the Kubernetes cluster using standard Helm charts created by the Prometheus community | | Kubernetes Dashboard | [code/k8s-common-code/k8sdashboard](code/k8s-common-code/k8sdashboard) | Deploying the Kubernetes dashboard, a browser-based GUI view of the Kubernetes cluster | +# Deploy KAT Project +| Deployment | File or Directory | Description | +|---|---|---| +| Cloud Native | [documentation/cloudvm.md](./documentation/cloudvm.md) | Deploy KAT on a Cloud | +| Local System | [documentation/quickstart-vagrant.md](./documentation/quickstart-vagrant.md) | Deploy KAT on your Local System| + # License All code and configuration in the BigBitBus KAT repository (code files contained in this directory and all subdirectories) is licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0). diff --git a/documentation/cloudvm.md b/documentation/cloudvm.md index 7955981..733ffe9 100644 --- a/documentation/cloudvm.md +++ b/documentation/cloudvm.md @@ -35,11 +35,11 @@ For example (Mac, Linux) ssh -i private_key_file theuser@publicip -L 8080:localhost:80 -N ``` -For Windows, see [this file](windows-setup.md) on how to setup Putty for port forwarding. +For Windows, see [this file](putty-setup.md) on how to setup Putty for port forwarding. You can now open a web-browser and reach these end-points - Todo application Vuejs Frontend [http://localhost:8080/frontend/](http://localhost:8080/frontend/) [Learn more](../code/app-code/frontend/todo-vuejs/) - - Todo application browsable API [http://localhost:8080/djangoapi/api/v1/](http://localhost:8080/djangoapi/api/v1) [Learn more](../code/app-code/api/todo-python-django/) + - Todo application browsable API [http://localhost:8080/djangoapi/apis/v1/](http://localhost:8080/djangoapi/apis/v1) [Learn more](../code/app-code/api/todo-python-django/) - Kubernetes Dashboard [http://localhost:8080/dashboard/](http://localhost:8080/dashboard/) [Learn more](../code/k8s-common-code/k8sdashboard/) (Access token is printed in the Vagrant output as mentioned above). - Grafana Monitoring [http://localhost:8080/monitoring-grafana/](http://localhost:8080/monitoring-grafana/) [Learn more](../code/k8s-common-code/monitoring/) (default credentials: admin/promoperator) diff --git a/documentation/windows-setup.md b/documentation/putty-setup.md similarity index 83% rename from documentation/windows-setup.md rename to documentation/putty-setup.md index 521a78d..507c112 100644 --- a/documentation/windows-setup.md +++ b/documentation/putty-setup.md @@ -1,4 +1,4 @@ -### This README goes over the steps needed to connect to the cloud VM and display the KAT example on your local Windows machine. You don't need this if you used Vagrant on your local machine. +### Connect to Cloud VM from your Local Windows Machine using Port Forwarding Technique. Requirements: - Putty diff --git a/documentation/quickstart-vagrant.md b/documentation/quickstart-vagrant.md index 7bfcdad..e417127 100644 --- a/documentation/quickstart-vagrant.md +++ b/documentation/quickstart-vagrant.md @@ -4,7 +4,7 @@ Follow these steps to quickly deploy the KAT example. You will need a PC with at 1. Clone this repository: `git clone https://github.com/BigBitBusInc/kubernetes-automation-toolkit.git` -2. Install Vagrant for your OS (Vagrant supports Windows, Linux and MacOS); you may also need to install the hypervisor software and a vagrant plugin for this hypervisor on your platform; you should also find this information on the Vagrant installation page for your OS. [This link](https://gist.github.com/wpscholar/a49594e2e2b918f4d0c4) lists some useful Vagrant commands. +2. Install `Vagrant` for your OS (Vagrant supports Windows, Linux and MacOS); you may also need to install the hypervisor software and a vagrant plugin for this hypervisor on your platform; you should also find this information on the Vagrant installation page for your OS. [Follow guidelines](../documentation/vagrant-setup.md) to setup Vagrant on your respective OS. [This link](https://gist.github.com/wpscholar/a49594e2e2b918f4d0c4) lists some useful Vagrant commands. 3. Navigate to the root directory of the KAT repository and enter this command in a terminal ```bash @@ -16,7 +16,7 @@ Please be patient, even on a fast Internet connection remember we are downloadin 3. You can now open a web-browser and reach these end-points - Todo application Vuejs Frontend [http://localhost:8080/frontend/](http://localhost:8080/frontend/) [Learn more](../code/app-code/frontend/todo-vuejs/) - - Todo application browsable API [http://localhost:8080/djangoapi/api/v1/](http://localhost:8080/djangoapi/api/v1) [Learn more](../code/app-code/api/todo-python-django/) + - Todo application browsable API [http://localhost:8080/djangoapi/apis/v1/](http://localhost:8080/djangoapi/apis/v1) [Learn more](../code/app-code/api/todo-python-django/) - Kubernetes Dashboard [http://localhost:8080/dashboard/](http://localhost:8080/dashboard/) [Learn more](../code/k8s-common-code/k8sdashboard/) (Access token is printed in the Vagrant output as mentioned above). - Grafana Monitoring [http://localhost:8080/monitoring-grafana/](http://localhost:8080/monitoring-grafana/) [Learn more](../code/k8s-common-code/monitoring/) (default credentials: admin/promoperator) @@ -51,7 +51,7 @@ Confirm that you can now log into the Vagrant VM by simply typing `vagrant ssh` ssh vagrant-vm-name-in-ssh-config -L 8080:localhost:80 -N ``` - For Windows you can look at some of the screenshots in [this file](windows-setup.md) to get an idea of how to set ssh port-forwarding with [Putty](https://www.putty.org/). + For Windows you can look at some of the screenshots in [this file](putty-setup.md) to get an idea of how to set ssh port-forwarding with [Putty](https://www.putty.org/). Here are links to some useful documentation of different tools that are used in the KAT example. @@ -75,3 +75,13 @@ To destroy the Vagrant VM, open a terminal and go to the kubernetes-automation-t ``` vagrant destroy ``` +## Useful Vagrant Commands +| Vagrant | Cmd | +| ---- | ---------- | +| Start Vagrant Environment | `vagrant up` | +| Connect to Vagrant via SSH | `vagrant ssh` | +| Stop Vagrant Machine | `vagrant halt` | +| Resume Vagrant Machine | `vagrant resume` | +| Suspend Virtual Machine | `vagrant suspend` | +| List Installed Boxes | `vagrant box list`| +| Delete Vagrant Machine | `vagrant destroy` | \ No newline at end of file diff --git a/documentation/vagrant-setup.md b/documentation/vagrant-setup.md new file mode 100644 index 0000000..2b6812b --- /dev/null +++ b/documentation/vagrant-setup.md @@ -0,0 +1,24 @@ +## Setup Vagrant on Windows + +1. Install `VirtualBox`. Vagrant requires VirtualBox to create Virtual Machine. Navigate to https://www.virtualbox.org/wiki/Downloads to Download Virtual Box. + +2. Install `Vagrant`. Navigate to https://www.vagrantup.com/downloads to download latest version of Vagrant. + +3. Install `Putty`. Navigate to https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html to download latest version of putty. + + +## Setup Vagrant on Mac + +1. Install `Virtual box` using [direct download](https://www.virtualbox.org/wiki/Downloads) or use homebrew for installing it.
`brew cask install virtualbox` + +2. Install `Vagrant` using [direct download](https://www.vagrantup.com/downloads.html) or use homebrew for installing it.
`brew cask install vagrant` + + +## Setup Vagrant on Linux +1. Install `Virtual box` by running:
`sudo apt update`
`sudo apt install virtualbox` + +2. Download `Vagrant` Package with wget:
`curl -O https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_x86_64.deb` + +3. Install Downloaded File by typing:
`sudo apt install ./vagrant_2.2.14_x86_64.deb` + +4. Verify installation using:
`vagrant --version` diff --git a/documentation/windows-setup-new.md b/documentation/windows-setup-new.md deleted file mode 100644 index 09413cc..0000000 --- a/documentation/windows-setup-new.md +++ /dev/null @@ -1,42 +0,0 @@ -## Setup Vagrant on Windows - -1. Setup `VirtualBox`. Vagrant requires VirtualBox to create Virtual Machine. Navigate to https://www.virtualbox.org/wiki/Downloads to Download Virtual Box. - -2. Setup `Vagrant`. Navigate to https://www.vagrantup.com/downloads to download latest version of Vagrant. - -3. Setup `Putty`. Navigate to https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html to download latest version of putty. - - -## Connect to Cloud VM from your Local Windows Machine using Port Forwarding Technique. - -Requirements: -- Putty - -### Steps - -1. Nagivate to C:\Windows\System32\drivers\etc - -2. Open the `host` file by right clicking and editing with either a text editor or notepad. -![Step2](images/Setup1.PNG) - -3. Add these lines to the `host` file: -``` -127.0.0.1 localhost -127.0.0.1 klocalhost -``` -![Step3](images/Setup2.PNG) - -4. Open Putty. Here you will need to create a session. Under `Host Name (or IP address)` supply your [username]@[IP of VM] with Port 22. -![Step4](images/Setup3.PNG) - -5. On the left-hand navigation bar, expand `SSH` and click on `Auth`. Supply your SSH key you used to create the VM. -![Step5](images/Setup4.PNG) - -6. Open up `Tunnels` below `SSH` and add: -`Source Port: 80 Destination: klocalhost:80` -`Source Port: 8080 Destination: localhost:80` -![Step6](images/Setup5.PNG) - -7. Save your session as you may need/want to reuse it. - -8. After saving the session, you can now `load` it and `open` which will connect you to the VM. From d9a7768d04391a49de0de4737d7a3bf206a2cb1c Mon Sep 17 00:00:00 2001 From: Sachin Agarwal Date: Tue, 5 Jan 2021 06:17:53 -0500 Subject: [PATCH 3/3] Made some changes to vagrant setup, added options for kvm and hyperV --- documentation/quickstart-vagrant.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/documentation/quickstart-vagrant.md b/documentation/quickstart-vagrant.md index e417127..c15aab1 100644 --- a/documentation/quickstart-vagrant.md +++ b/documentation/quickstart-vagrant.md @@ -4,8 +4,7 @@ Follow these steps to quickly deploy the KAT example. You will need a PC with at 1. Clone this repository: `git clone https://github.com/BigBitBusInc/kubernetes-automation-toolkit.git` -2. Install `Vagrant` for your OS (Vagrant supports Windows, Linux and MacOS); you may also need to install the hypervisor software and a vagrant plugin for this hypervisor on your platform; you should also find this information on the Vagrant installation page for your OS. [Follow guidelines](../documentation/vagrant-setup.md) to setup Vagrant on your respective OS. [This link](https://gist.github.com/wpscholar/a49594e2e2b918f4d0c4) lists some useful Vagrant commands. - +2. Install `Vagrant` for your OS (Vagrant supports Windows, Linux and MacOS); you may also need to install the hypervisor software and a vagrant plugin for this hypervisor on your platform; We have [guidelines](../documentation/vagrant-setup.md) on how to setup Vagrant on your PC. 3. Navigate to the root directory of the KAT repository and enter this command in a terminal ```bash cd kubernetes-automation-toolkit @@ -84,4 +83,6 @@ vagrant destroy | Resume Vagrant Machine | `vagrant resume` | | Suspend Virtual Machine | `vagrant suspend` | | List Installed Boxes | `vagrant box list`| -| Delete Vagrant Machine | `vagrant destroy` | \ No newline at end of file +| Delete Vagrant Machine | `vagrant destroy` | + +[This link](https://gist.github.com/wpscholar/a49594e2e2b918f4d0c4) lists some useful Vagrant commands.