Bootstrap a management cluster¶
After you complete the prerequisite steps described in Prerequisites, proceed with bootstrapping your OpenStack-based Mirantis Container Cloud management cluster.
To bootstrap an OpenStack-based management cluster:
Log in to the bootstrap node running Ubuntu 18.04 that is configured as described in Prerequisites.
Prepare the bootstrap script:
Download and run the Container Cloud bootstrap script:
wget https://binary.mirantis.com/releases/get_container_cloud.sh chmod 0755 get_container_cloud.sh ./get_container_cloud.sh
Change the directory to the
kaas-bootstrapfolder created by the script.
Obtain your license file that will be required during the bootstrap:
Create a user account at www.mirantis.com.
Log in to your account and download the
Save the license file as
kaas-bootstrapdirectory on the bootstrap node.
Prepare the OpenStack configuration for a new cluster:
Log in to the OpenStack Horizon.
In the Project section, select API Access.
In the right-side drop-down menu Download OpenStack RC File, select OpenStack clouds.yaml File.
Save the downloaded
clouds.yamlfile in the
kaas-bootstrapfolder created by the
clouds.yaml, add the
passwordfield with your OpenStack password under the
clouds: openstack: auth: auth_url: https://auth.openstack.example.com:5000/v3 username: your_username password: your_secret_password project_id: your_project_id user_domain_name: your_user_domain_name region_name: RegionOne interface: public identity_api_version: 3
Verify access to the target cloud endpoint from Docker. For example:
docker run --rm alpine sh -c "apk add --no-cache curl; \ curl https://auth.openstack.example.com:5000/v3"
The system output must contain no error records.
In case of issues, follow the steps provided in Troubleshooting.
Configure the cluster and machines metadata:
templates/machines.yaml.template, modify the
spec:providerSpec:valuesection for 3 control plane nodes marked with the
cluster.sigs.k8s.io/control-planelabel by substituting the
imageparameters with the corresponding values of the control plane nodes in the related OpenStack cluster. For example:
spec: &cp_spec providerSpec: value: apiVersion: "openstackproviderconfig.k8s.io/v1alpha1" kind: "OpenstackMachineProviderSpec" flavor: kaas.minimal image: bionic-server-cloudimg-amd64-20190612
flavorparameter value provided in the example above is cloud-specific and must meet the Container Cloud requirements.
Also, modify other parameters as required.
templates/cluster.yaml.templateparameters to fit your deployment. For example, add the corresponding values for
Optional. Available since Container Cloud 2.12.0. Configure backups for the MariaDB database as described in Configure periodic backups of MariaDB for AWS and OpenStack providers.
Optional. Configure the regional NTP server parameters to be applied to all machines of regional and managed clusters in the specified region.
templates/cluster.yaml.template, add the
ntp:serverssection with the list of required servers names:
spec: ... providerSpec: value: kaas: ... regional: - helmReleases: - name: openstack-provider values: config: lcm: ... ntp: servers: - 0.pool.ntp.org ... provider: openstack ...
Optional. If you require all Internet access to go through a proxy server, in
bootstrap.env, add the following environment variables to bootstrap the management and regional cluster using proxy:
export HTTP_PROXY=http://proxy.example.com:3128 export HTTPS_PROXY=http://user:email@example.com:3128 export NO_PROXY=172.18.10.0,registry.internal.lan
The following variables formats are accepted:
http://proxy.example.com:port- for anonymous access
http://user:firstname.lastname@example.org:port- for restricted access
Comma-separated list of IP addresses or domain names
For the list of Mirantis resources and IP addresses to be accessible from the Container Cloud clusters, see Requirements for an OpenStack-based cluster.
Optional. Configure external identity provider for IAM.
Optional. If you are going to use your own TLS certificates for Keycloak, set
Run the bootstrap script:
In case of deployment issues, refer to Troubleshooting. If the script fails for an unknown reason:
Run the cleanup script:
Rerun the bootstrap script.
If the bootstrap fails on the Connecting to bootstrap cluster step with the unable to initialize Tiller in bootstrap cluster: failed to establish connection with tiller error, refer to the known issue 16873 to identify possible root cause of the issue and apply the workaround, if applicable.
When the bootstrap is complete, collect and save the following management cluster details in a secure location:
kubeconfigfile located in the same directory as the bootstrap script. This file contains the admin credentials for the management cluster.
ssh_keyfor access to the management cluster nodes that is located in the same directory as the bootstrap script.
If the initial version of your Container Cloud management cluster was earlier than 2.6.0,
openstack_tmpand is located at
The URL for the Container Cloud web UI.
To create users with permissions required for accessing the Container Cloud web UI, see Create initial users after a management cluster bootstrap.
The StackLight endpoints. For details, see Access StackLight web UIs.
The Keycloak URL that the system outputs when the bootstrap completes. The admin password for Keycloak is located in
kaas-bootstrap/passwords.ymlalong with other IAM passwords.
The Container Cloud web UI and StackLight endpoints are available through Transport Layer Security (TLS) and communicate with Keycloak to authenticate users. Keycloak is exposed using HTTPS and self-signed TLS certificates that are not trusted by web browsers.
To use your own TLS certificates for Keycloak, refer to Configure TLS certificates for management cluster applications.
When the bootstrap is complete, the bootstrap cluster resources are freed up.
Optional. Deploy an additional regional cluster as described in Deploy an additional regional cluster (optional).
Now, you can proceed with operating your management cluster using the Container Cloud web UI and deploying managed clusters as described in Create and operate an OpenStack-based managed cluster.