kubernetes/contrib/ansible
See: https://github.com/nds-org/ndslabs-deploy-tools
More details: https://opensource.ncsa.illinois.edu/jira/browse/NDS-312
We've forked contrib/ansible and modified it slightly, before wrapping it in our own set of playbooks for deploying Labs.
These Ansible scripts are currently specific to NCSA / SDSC, but with little manual effort can be expanded to accommodate other OpenStack installations at other sites.
OpenStack Heat
See: https://kubernetes.io/docs/getting-started-guides/openstack-heat/
Steps so far:
- docker run -it -v /home/core/private:/private bodom0015/k8-openstack-cli:NDS-767
- source /private/NDSLabsDev-openrc.sh
- Enter password
- yum -y install curl wget which openssh
- export KUBERNETES_PROVIDER=openstack-heat; curl -sS https://get.k8s.io | bash
- cd /kubernetes && export PATH=$PATH:/kubernetes/client/bin/
- ssh-keygen -t rsa
- Accept all defaults
- export FIXED_NETWORK_CIDR='192.168.100.0/24'
- export EXTERNAL_NETWORK=NDSLabsDev
# KUBERNETES_PROVIDER=openstack-heat ./cluster/kube-up.sh
At this point, I got an error:
[root@5dd321770f37 kubernetes]# KUBERNETES_PROVIDER=openstack-heat ./cluster/kube-up.sh ... Starting cluster using provider: openstack-heat ... calling verify-prereqs swift client installed glance client installed nova client installed heat client installed openstack client installed ... calling verify-kube-binaries ... calling kube-up kube-up for provider openstack-heat [INFO] Execute commands to create Kubernetes cluster [INFO] Uploading kubernetes-server-linux-amd64.tar.gz kubernetes-server.tar.gz [INFO] Uploading kubernetes-salt.tar.gz kubernetes-salt.tar.gz [INFO] Image CentOS7 already exists [INFO] Key pair already exists Stack not found: KubernetesStack [INFO] Retrieve new image ID [INFO] Image Id 682f4eb3-97e3-4ebd-88fa-bf9b563bbd2d [INFO] Create stack KubernetesStack +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | id | 5a1e4820-ddac-4658-9082-4c3295d556c3 | | stack_name | KubernetesStack | | description | Kubernetes cluster with one master and one or more worker nodes (as specified by the number_of_minions parameter, which defaults to 3). | | | | | creation_time | 2017-03-07T23:38:15Z | | updated_time | None | | stack_status | CREATE_IN_PROGRESS | | stack_status_reason | | +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ ... calling validate-cluster Cluster status CREATE_IN_PROGRESS Cluster status CREATE_FAILED Cluster not created. Please check stack logs to find the problem Done, listing cluster services: The connection to the server localhost:8080 was refused - did you specify the right host or port? [root@5dd321770f37 kubernetes]#
Will continue trying to make small steps towards success.