Skip to content
This repository has been archived by the owner on May 24, 2020. It is now read-only.

deploy: An ansible based deployment for GCS #6

Merged
merged 2 commits into from
Sep 21, 2018

Conversation

kshlm
Copy link
Member

@kshlm kshlm commented Sep 20, 2018

This commit adds an initial ansible based deployment for a GD2 + CSI
driver based GCS setup. More information is available in the
deploy/README.md file.

Also present along with the ansible playbooks, is a Vagrantfile that
starts a 3 VM cluster using vagrant-libvirt, and deploys Kubernetes and
GCS on the VMs.

Kubernetes is deployed using [kubespray][1]. Kubespray is added to this
repo as a sub-module. The GCS deployment playbooks also depend upon
kubespray.

Note: As of this commit, the playbooks have been only tested on the
Vagrant environment, and should be considered as not working elsewhere.

Copy link
Member

@JohnStrunk JohnStrunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please remove the namespace: fields from the yamls and instead deploy w/ kubectl -n gcs apply -f .... That will make it much easier to change the deployment namespace and re-use the files elsewhere.
  • Run yamllint over the files... there is a good bit of incorrect list indentation.

metadata:
name: gcs-example-volume
annotations:
volume.beta.kubernetes.io/storage-class: glusterfs-csi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method of specifying the StorageClass was deprecated in 1.6. It is now specified via spec.storageClassName
https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/#using-dynamic-provisioning

metadata:
name: glusterfs-csi
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer beta: storageclass.kubernetes.io/is-default-class
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1

value: "http://etcd-client.gcs:2379"
- name: GD2_CLUSTER_ID
value: "{{ gcs_gd2_clusterid }}"
# TODO: Remove RESTAUTH false once we enable setting auth token using secrets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note in the docs that the cluster is wide open because of this.

This commit adds an initial ansible based deployment for a GD2 + CSI
driver based GCS setup. More information is available in the
deploy/README.md file.

Also present along with the ansible playbooks, is a Vagrantfile that
starts a 3 VM cluster using vagrant-libvirt, and deploys Kubernetes and
GCS on the VMs.

Kubernetes is deployed using [kubespray][1]. Kubespray is added to this
repo as a sub-module. The GCS deployment playbooks also depend upon
kubespray.

Note: As of this commit, the playbooks have been only tested on the
Vagrant environment, and should be considered as not working elsewhere.

Signed-off-by: Kaushal M <kshlmster@gmail.com>
@kshlm
Copy link
Member Author

kshlm commented Sep 21, 2018

  • Please remove the namespace: fields from the yamls and instead deploy w/ kubectl -n gcs apply -f .... That will make it much easier to change the deployment namespace and re-use the files elsewhere

The ClusterRoleBinding definitions need to know the namespace of the subject they are binding a role to. This namespace cannot be provided with the --namespace flag to kubectl.

If the ability to change namespace is required, what could be done is to have ansible fill in the namespace converting the manifests to jinja templates. I'll be doing this for now. Let me know if this isn't sufficient.

The namespace in which GCS is deployed can be configured by setting the
'gcs_namespace' Ansible variable.

Signed-off-by: Kaushal M <kshlmster@gmail.com>
@JohnStrunk
Copy link
Member

The ClusterRoleBinding definitions need to know the namespace of the subject they are binding a role to. This namespace cannot be provided with the --namespace flag to kubectl.

I see that now... .subject.namespace for specifying the service account. That's unfortunate.

@JohnStrunk JohnStrunk merged commit 8abbb6e into gluster:master Sep 21, 2018
@ghost ghost removed the in progress label Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants