Install CNCF Cloud-Native DevOps Tools
Prepare to run a Private Catalog Tile or IBM Schematics to install the CNCF Cloud-Native DevOps Tools into an existing IBM Cloud managed OpenShift or Kubernetes cluster
Prerequisites
The CNCF Cloud-Native DevOps Tools are installed by an IBM Cloud Account administrator, who will run the IasC to create the environment in an IBM Cloud account. The scripts will run as the environment administrator’s user. These instructions explain how to configure and run the Terraform (IasC) scripts to create the Developer Environment.
Confirm permissions
Optional: To help confirm that the scripts will have the permissions they’ll require, the environment administrator may log into the account and test creating a couple of resources:
- Create a cluster — Make it single-zone, and specify the proper data center and resource group
- Create a namespace in the image registry
As long as the user can create these resources successfully the schematics terraform script will be able to apply its state to the cluster.
Configure IBM Cloud Private Catalog Tile or IBM Schematics workspace to install a collection of CNCF Cloud-Native Tools to support CI/CD DevOps
Install with Private Catalog Tile
First step is to create a Catalog, Click Manage->Catalogs
Click on Create Catalog , provide a name for example
Team Catalog
Click Update to change the default resource group for the Catalog
Click Create to complete the Catalog Creation
Next step is to run the following script to register Cloud-Native Toolkit tile into the Catalog as an offering. You will need an IBM Cloud API Key
Clone this repository to the Cloud Shell or you local workstation
Run the
offering.sh
scripts passing in the API Key and the name of the Catalog that you createdIf you are not running this from the Cloud Shell you will need to install
jq
into you command line environment jq downloadsgit clone https://github.com/ibm-garage-cloud/cloudnative-toolkitcd cloudnative-toolkit./offering.sh {API_KEY} "Team Catalog"
Install with IBM Schematics
This link Cloud Native Toolkit will give you more information about the Terraform that is used to install the tools.
Create a workspace in IBM Schematics service and call it
cloud-native-toolkit
and place it in your nominate resource group.On the Settings view import your terraform template
https://github.com/ibm-garage-cloud/cloudnative-toolkitselect
terraform_v0.12
version from the Terraform version drop downclick Save template information
To support the running of the Terraform for the CNCF DevSecOps installation configure your variables
The installation requires a set of variables to be set for your environment. The Private Catalog Tile or IBM Schematics Terraform assumes that a cluster has already been created and CNCF tools will be installed into an existing cluster.
Variable | Description | eg. Value |
---|---|---|
ibmcloud_api_key | The API key from IBM Cloud Console that support service creation access writes | {guid API key from Console} |
resource_group_name | The name of the resource group where the cluster is created | dev-team-one |
cluster_type | The name of the cluster | kubernetes or ocp4 |
cluster_name | The name of the cluster | dev-team-one-iks-117-vp |
cluster_exists | Does the cluster exist already | true |
vpc_cluster | Is the cluster created in a VPC | true |
Environment variables
Set them based on the existing cluster:
resource_group_name
— The existing cluster’s resource groupcluster_exists
— Set totrue
for an existing clustercluster_type
— Specify the existing cluster’s type- kubernetes — Kubernetes
- ocp3 — OpenShift v3
- ocp4 — OpenShift v4
cluster_name
— The existing cluster’s namevpc_cluster
— Is the cluster running in a VPC
Install from the Private Catalog Tile or Apply the Schematics workspace to complete configuration
Private Catalog Tile
Accept the Apache 2 License
Click Install
This will kick off the installation of the CNCF Cloud-Native DevOps Tools into a development cluster
Navigate to the Schematics service and track the logs for the configuration
Once complete you can now start to use the development tools in your cloud native project
Schematics
Having configured the variables for the workspace you can now apply it
Navigate to the Workspace you have configured
cloud-native-toolkit
Click on the Apply
Installing the tools into an existing cluster takes about 30 minutes. You can view the workspace logs to see the progress of the execution of the Schematics Terraform scripts
Once the tools are installed with Terraform using IBM Cloud Schematics you will see this message in the logs
2020/06/01 10:55:46 Terraform apply |2020/06/01 10:55:46 Terraform apply | Apply complete! Resources: 59 added, 0 changed, 0 destroyed.2020/06/01 10:55:46 Terraform apply |2020/06/01 10:55:46 Terraform apply | The state of your infrastructure has been saved to the path2020/06/01 10:55:46 Terraform apply | below. This state is required to modify and destroy your2020/06/01 10:55:46 Terraform apply | infrastructure, so keep it safe. To inspect the complete state2020/06/01 10:55:46 Terraform apply | use the `terraform show` command.2020/06/01 10:55:46 Terraform apply |2020/06/01 10:55:46 Terraform apply | State path: ./state/terraform.tfstateEnd of the installation process
Developer Environment
Once the Schematics scripts have finished, you can see the resources that the scripts created in IBM Cloud:
- In the IBM Cloud console, open the Resource List
- On the Resource List page, filter by your Resource Group (e.g.
dev-team-one
) - You should see these resources listed:
- Clusters: 1, either Kubernetes or OpenShift
- Select the cluster and open the Kubernetes dashboard or OpenShift web console. You should see:
- Namespaces:
tools
,dev
,test
, andstaging
- Deployments in the
tools
namespace:developer-dashboard
,jenkins
, etc.
- Namespaces:
To get started open the Developer Dashboard or navigate to the tools using the OpenShift Tools menu.
For more information on how to get start walk through these guides
Possible issues
If you find that that the Terraform provisioning has failed, try deleting the workshpace and configuring it again
Post Installation steps
- Two of the default tools that were installed Artifactory and ArgoCD require some post installation configuration.
- Complete these steps documented here for Artifactory Configuration
- Complete these steps documented here for ArgoCD Configuration