This repository contains Ansible roles and playbooks to install, upgrade, and manage OpenShift clusters.
This repository is based on openshift/openshift-ansible project. See more informations.
To setup openshift cluster by ansible on huawei clouds, it has made some changes about openstack roles, playbooks and inventories.
In order to setup openshift cluster by ansible, you'll need to finish the following steps:
- Host Operation System: CentOS 7.3+
- Host Operation System User: root
- Available EIP Quatas on Cloud: 4+
- Available VPC Quatas on Cloud: 1+
- Available Security Group Quatas on Cloud: 6+
NOTE: If you are trying to deployment openshift cluster on FusionCloud, Because unlike huawei public clouds have relative fixed infra options(images, flavors, etc.), the different FusionCloud environment may have different prepared infrastructures(images, flavors, etc.), you need pre-check and ensure the config options. please see FusionCloud prerequisites
- pull openshift-ansible github repository.
curl https://raw.githubusercontent.com/huaweicloud/openshift-ansible/master/hack/pull-repos.sh | bash
- set cloud credentials.
cd openshift-ansible
vi keystonerc
# set your own ENV in the file
export OS_AUTH_URL=https://iam.cn-north-1.myhwclouds.com
export OS_USERNAME=user
export OS_PASSWORD=password
export OS_IDENTITY_API_VERSION=3
export OS_DOMAIN_NAME=domain
export OS_USER_DOMAIN_NAME=domain
export OS_PROJECT_DOMAIN_NAME=domain
export OS_TENANT_NAME=tenant
export OS_REGION_NAME=cn-north-1
export OS_AVAILABILITY_ZONE=cn-north-1a
-
Create a new keypair named openshift in cloud web console and put the private key file openshift.pem into openshift-ansible folder.
-
Install openshift cluster by the following command which can be executed repeatly until success.
. hack/install.sh
- If you need to uninsall openshift cluster, you can run the following command.
. hack/uninstall.sh
Here are some application examples for testing openshift on huawei clouds.
See the contribution guide.
See the LICENSE file for details.