1 #############################
2 OpenStack Magnum (Kubernetes)
3 #############################
5 This section contains a series of macros for projects that need to spin up
6 kubernetes clusters using JJB.
11 The two macros :ref:`lf-kubernetes-create` & :ref:`lf-kubernetes-delete` are
12 companion macros and used together when constructing a job template that needs
26 base-image: Fedora Atomic 29 [2019-08-20]
28 cluster-settle-time: 1m
29 docker-volume-size: 10
30 fixed-network: ecompci
31 fixed-subnet: ecompci-subnet1
33 kubernetes-version: v1.16.0
35 master-flavor: v2-standard-1
37 node-flavor: v2-highcpu-8
46 - lf-kubernetes-create:
47 openstack-cloud: "{openstack-cloud}"
48 base-image: "{base-image}"
49 boot-volume-size: "{boot-volume-size}"
50 cluster-settle-time: "{cluster-settle-time}"
51 docker-volume-size: "{docker-volume-size}"
52 fixed-network: "{fixed-network}"
53 fixed-subnet: "{fixed-subnet}"
55 kubernetes-version: "{kubernetes-version}"
56 master-count: "{master-count}"
57 master-flavor: "{master-flavor}"
58 node-count: "{node-count}"
59 node-flavor: "{node-flavor}"
61 - lf-kubernetes-delete
67 .. _lf-kubernetes-create:
72 Creates an OpenStack Kubernetes cluster as configured by the job. Name pattern
73 of stack is ``$SILO-$JOB_NAME-$BUILD_NUMBER``.
75 Requires ``lf-infra-pre-build`` macro to run first to install the
76 ``openstack`` and ``lftools`` packages.
78 Requires a Config File Provider configuration for clouds.yaml named
83 :openstack-cloud: The ``OS_CLOUD`` variable to pass to OpenStack client.
84 (Docs: https://docs.openstack.org/python-openstackclient)
85 :base-image: The base image to use for building the cluster. LF is
86 using the Fedora Atomic images.
87 :boot-volume-size: The size of the operating system disk for each node.
88 :cluster-settle-time: A parameter that controls the buffer time after
89 cluster creation before we start querying the API for status.
90 :docker-volume-size: The size of the Docker volume.
91 :fixed-network: The private network to build the cluster on.
92 :fixed-subnet: The subnet to use from the above private network
93 :keypair: The ssh keypair to inject into the nodes for access.
94 :kubernetes-version: The version of kubernetes to use for the cluster.
95 Available versions are v1.14, v1.15, and v1.16
96 :master-count: The number of masters for the cluster (configuring more than
97 one master automatically triggers the creation of a load-balancer).
98 :master-flavor: The flavor (size) of the master node.
99 :node-count: The number of kubernetes nodes for the cluster.
100 :node-flavor: The flavor (size) of the worker nodes.
103 .. _lf-kubernetes-delete:
108 Deletes the stack associated with this job. Name pattern of stack is
109 ``$SILO-$JOB_NAME-$BUILD_NUMBER``.
111 Requires ``lf-infra-pre-build`` macro to run first to install the
112 ``openstack`` and ``lftools`` packages.
114 Requires a Config File Provider configuration for clouds.yaml named