Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Deploying via kubernetes/contrib/ansible

See: https://github.com/nds-org/ndslabs-deploy-tools

...

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.

...

Deploying via kube-up.sh

See: https://kubernetes.io/docs/getting-started-guides/openstack-heat/

Steps so farFeatures:

Usage

  1. docker run -it -v /home/core/private:/private bodom0015/k8-openstack-cli:NDS-767
  2. source /private/NDSLabsDev-openrc.sh
    1. Enter password
  3. yum -y install curl wget which openssh
  4. ssh-keygen -t rsa
    1. Accept all defaults
  5. export KUBERNETESexport KUBERNETES_PROVIDER='openstack-heat'; curl -sS https://get.k8s.io | bash cd /kubernetes && export PATH=$PATH$PATH:/kubernetes/client/bin/
  6. ssh-keygen -t rsa
    1. Accept all defaults
  7. export FIXEDexport EXTERNAL_NETWORK=ext-net FIXED_NETWORK_CIDR='192.168.100.0/24'24 
  8. export MASTER_FLAVOR=m1.medium MINION_FLAVOR=m1.large
  9. export EXTERNALSTACK_NETWORKNAME=NDSLabsDevkubernetes

...

  1. export KUBERNETES_PROVIDER=openstack-

...

  1. heat && cd /kubernetes && ./cluster/kube-up.sh

This will create a stack named kubernetes under the Horizon dashboard's Orchestration → Stacks view. Here, you can check the progress of the creation task by choosing a Stack and viewing its Resources tab.

The whole process takes about 10 minutes to finish. You should see instances being spun up in the project's Compute → Instances view.

You should see the following outputAt this point, I got an error:

Code Block
languagebash
[root@5dd321770f37root@34268c72ab27 kubernetes]# export KUBERNETES_PROVIDER=openstack-heat && cd /kubernetes && ./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
ERROR (CommandError): No keypair with a name or ID of 'kubernetes_keypair' exists.
[INFO] Key pair already existscreated
Stack not found: KubernetesStackkubernetes
[INFO] Retrieve new image ID
[INFO] Image Id 682f4eb3-97e3-4ebd-88fa-bf9b563bbd2d
[INFO] Create stack KubernetesStackkubernetes
+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| Field               | Value                                                                                                                                   |
+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| id                  | 5a1e4820f26624a4-ddaceca6-46584fed-9082-4c3295d556c3b0da-40f5b5ae64e9                                                                                                    |
| stack_name          | KubernetesStack kubernetes                                                                                                                              |
| 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-07T2315T16:38:15Z52:09Z                                                                                                                    |
| updated_time        | None                                                                                                                                    |
| stack_status        | CREATE_IN_PROGRESS                                                                                                                      |
| stack_status_reason |                                                                                                                                         |
+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
... calling validate-cluster
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_FAILEDIN_PROGRESS
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]#

 

status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS
Cluster status CREATE_IN_PROGRESS



 Will continue trying to make small steps towards success.