-
Notifications
You must be signed in to change notification settings - Fork 2
Installing Rancher Step 1
(Update Apr:28th) There are issues with the communication between the workers when we are creating this setup. I have added a new document that can setup Kubernetes without using Rancher. (Link)
Login to the instance where you were assigned a public domain. (public domain of the VM)
Copy the public key from your local machine to authorized keys in your remote machine.
To find the public key of your machine type in the below command
cat ~/.ssh/id_rsa.pub
Paste the content to the authorized keys file on your remote. (Run this on your remote machine)
vi ~/.ssh/authorized_keys
<paste the public key>
- Download and extract the modified cloudmon code from this file: (Provided by Isuru)
https://airavata.slack.com/files/U030JR7JXDF/F03CA28HZ6J/cloudman.zip
- Update the agent to your domain name.
- Update the controllers to your domain name.
- Update ansible user to exouser. (If instance is created from Exosphere)
- Update ansible password to passphrase.
- Uncomment the last line and put the path to your public key.
Below is the file we had after updating all the details.
[controllers]
js2-154-102.jetstream-cloud.org
[agents]
js2-154-102.jetstream-cloud.org
[rke_cluster:children]
controllers
agents
[all:vars]
ansible_ssh_port=22
ansible_user='exouser'
ansible_user_password='LUKE AWN CRAM SHOE GIRL BOOT HERO EVIL OWLY WOK YEAH'
ansible_ssh_extra_args='-o StrictHostKeyChecking=no'
ansible_ssh_private_key_file=/Users/chowtagowtham/.ssh/id_rsa
python -m venv cust-dev
source cust-dev/bin/activate
pip install ansible
And run the ansible playbook.
ansible-playbook -i inventory/sample.ini playbook.yml
This should take a good 5-10 mins to set everything. It is time to take a coffee break.
- This will setup Helm, Rancher, cloudmon. It also setups Kubernetes secrets, certificate setup. You should get the output something similar to this:
- Login to the Jetstream VM. Run the below commands
helm repo add rancher https://releases.rancher.com/server-charts/stable
kubectl create namespace cattle-system
helm repo update
And finally:
## Replace the hostname with your hostname, email with your email.
helm install -n cattle-system rancher rancher/rancher --set hostname=<HOSTNAME> --set ingress.tls.source=letsEncrypt --set letsEncrypt.email="<email_add> --set letsEncrypt.environment="production" --set letsEncrypt.ingress.class=nginx --version 2.5.5
## Here is the command I will be running. Please change accordingly.
helm install -n cattle-system rancher rancher/rancher --set hostname=js2-154-102.jetstream-cloud.org --set ingress.tls.source=letsEncrypt --set letsEncrypt.email="chgowt@iu.edu" --set letsEncrypt.environment="production" --set letsEncrypt.ingress.class=nginx --version 2.5.5
You should get the below output:
Wait for a couple of mins for the cluster to be started.
4.2 Checking if everything is setup. After you run the below command you should see everything in running and completed state.
kubectl get all --all-namespaces
After type in below command you should see inginx-ngress-controller with a type Load balancer. Get the node ports starting >30000.
kubectl get services -n ingress-nginx
Try to access the URL https://your-domain-name:nodeport
There is a good chance that you get a certificate error when you try to access the URL. One fix is to install ingress-nginx-controller again.
Run the below commands to remove ingress-nginx.
helm delete ingress-nginx -n ingress-nginx
## Wait till all the resources of ingress-nginx are deleted. You can continuously ping with the below command to check if there are any resources available.
kubectl get all -n ingress-nginx
And run the below command to install ingress-nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.44.0/deploy/static/provider/cloud/deploy.yaml
## Wait till all the services are up of ingress-nginx. You can continuously check using the same command.
kubectl get all -n ingress-nginx
Now again find the node port using the above command. The node port might change since we re-installed the nginx-ingress service.
Try to access the URL again https://domainname:nodeport
Our rancher is live on: https://js2-154-102.jetstream-cloud.org:32573/
Updated IP: (https://custosterrarancher.org:30747/). We lost the old domain, we repeated the same steps on a different domain name.
- Lastly, Create password and you are ready to setup kubernetes cluster.
Note: The username will be 'admin'.
We would like to thank Isuru and Abhinav for their support through out the setup.
Milestone - 1:
Milestone - 2:
- Weather service and Forecasting service with 1 pod
- Weather Service and Forecasting Service with 3 and 5 pods
- User service - 1 pod
- User service -3 and 5 pods
- Auto Scaling
Milestone -3:
Milestone - 4: