For those interested in the ansible files themselves, here is a little more information about them.
Three playbooks are used to create hosts
- create-etcd-hosts.yml
- create-minion-hosts.yml
- create-master-hosts.yml
Each of these playbooks uses the clc_provisioning role, runs on localhost and makes http calls to the CenturyLink Cloud API.
The process writes several configuration files to the cluster home directory, found at ~/.clc_kube/${CLC_CLUSTER_NAME} The configuration files config/master_config.yml and config/minion_config.yml contain the cluster name and the VM provisioning information.
In part 2, the kube-up.sh script calls a playbook to install etcd.
ansible-playbook -i hosts-${CLC_CLUSTER_NAME} install_etcd.yml \ -e config_vars=${CLC_CLUSTER_HOME}/config/master_config.yml
In part 3, the kube-up.sh script calls two playbooks to install kubernetes, with differerent configurations for the master and minion nodes.
`ansible-playbook create-minion-hosts.yml
-e config_vars=${CLC_CLUSTER_HOME}/config/minion_config.yml
ansible-playbook create-master-hosts.yml
-e config_vars=${CLC_CLUSTER_HOME}/config/master_config.yml`
In part 4, the kube-up.sh script calls a playbook to deploy some of the standard addons
This playbook can be used outside of the script as well to install additional applications. There are templates in the role kubernetes-manifest already written for several applications. These can be applied with the deploy_kube_applications.yml playbook (using the ansible json-syntax for a command-line list)
app_list='{"k8s_apps":["guestbook-all-in-one","kube-ui"]}
ansible-playbook -i hosts-${CLC_CLUSTER_NAME} -e ${app_list} deploy_kube_applications.yml