Deploy opencontrail cloud on Ubuntu 16.04 OS [1 k8s-master, 1 k8s-node] as POC on AWS
Steps to deploy opencontrail+k8s on AWS
- AWS account
- On host from where these scripts will be executed, install the below packages
- apt-get -y install python-pip ansible git awscli
- Configure, aws with credentials, access_key and secret_access_key
- Git clone the repo
- Change directory 'cd opencontrail-k8s-poc-aws'
- Copy the opencontrail docker packages and ansible packages under ansible/files folder
- Below is the example
- contrail_package: contrail-kubernetes-docker-images_4.0.0.0-20.tgz
- contrail_ansible_package : contrail-ansible-4.0.0.0-20.tar.gz
- The above packages can be found by doing the below steps:
- Download contrail-kubernetes-docker_4.0.0.0-20_xenial.tgz, from juniper download site[http://www.juniper.net/support/downloads/?p=contrail#sw]
- Untar the above package to get contrail_package, tar -zxvf contrail-kubernetes-docker_4.0.0.0-20_xenial.tgz
- Untar contrail-networking-tools_4.0.0.0-20.tgz, to get contrail_ansible_package
- Run ./create_keypair.sh [Create KeyPair]
- Populate cstack-parameters.json located at (cloudformation/cluster) file with name of the EC2 instances (CCName1, CCName2)
- Create VPC, Subnet and 2 EC2 instances with host OS Ubuntu 16.04
- Run ./create_ocontrail_stack.sh <stack-name> ocontrail.json cstack-parameters.json
- Wait for couple of minutes for the EC2 instances to come up
- Verify cloudformation stack and populate cluster information
- Run ./verify_ocontrail_stack.sh <stack-name>
- Modify contrail_package, contrail_ansible_package and contrail_version parameters in ansible/playbooks/inventory/group_vars/all.yml file
- Run ansible playbook to deploy opencontrail+k8s
- Change directory 'cd ansible/playbooks'
- Run 'ansible-playbook -i inventory/ k8s-contrail.yml'
- Connect to contrail-webui, using public IP address of CCName1 EC2 instance with credentials admin/contrail123
- Run, ./delete_ocontrail_stack.sh <stack_name>
- Run, ./delete_keypair.sh