This is the second step in the setup process for this project. A kubernetes cluster is required to deploy a hyperledger fabric network
Automation tool used: kubespray
-
Kubespray is a kubernetes SIG project. It automates the deployment of production ready kubernetes cluster.
-
It uses ansible as the automation tool.
-
It supports kubeadm deployment.
-
This customised version of kubespray is used in this project: Official version
v2.6.0is customised for ubuntu xenial.
- Kubernetes:
v1.11.3 - Kubeadm:
v1.11.3 - ETCD cluster:
v3.2.24 - Weave CNI plugin:
2.4.1 - Docker:
18.09.2
Code location:
kubespray/: . It contains the code for external module "kubespray"openstack_infra/roles/: Ansible roles for instance setups e.g. DNS, NFS server etc
Ansible Playbook: cluster_setup.yaml
Command: ansible-playbook -i inventory/cluster/hosts.ini -v cluster_setup.yaml
Variables:
- Defined in file: k8s-cluster.yml
- Documentation can be found here
This command will call cluster_setup.yaml playbook, which will perform 3 steps:
- Prepare openstack instances for deployment: playbooks/setup_instances.yaml
- Install python on all instances
- Setup bind9 DNS server on instance
k8s_lb_instanceas created in InfrastructureSetup - Setup Haproxy Load-balancer on instance
k8s_lb_instanceas created in InfrastructureSetup - Setup NFS server on instance
k8s_nfs_instanceas created in InfrastructureSetup - Point DNS to created DNS server on all instances including CLI
- Install NFS client on all instances
- Create k8s cluster using kubespray: kubespray/cluster.yml
- Create k8s admin user and print access details to kubernetes dashboard: playbooks/cluster_admin.yaml