Installation
#
How to: Install MCCP using a Helm chartInstalling MCCP requires we:
- Create a namespace
- Choose a database
- Create a secret for docker repository
- Create a secret for creating pull requests on your git provider
- Determine the public IP address of the worker nodes
- Install the MCCP helm chart
- Check that MCCP has been installed (optional)
#
1. Creating a namespaceCreate a new namespace that will be used to run the MCCP components:
#
2. Choosing a databaseMCCP stores incoming data from the connected clusters to a relational database. It supports SQLite and PostgreSQL. When using SQLite the database file may be stored on a host path volume or on a persistent volume. By default, MCCP will use SQLite on a host path volume.
info
Installing MCCP in its default configuration is ideal for trying it out but it is not recommended for production use. Using a SQLite database on a persistent volume or a cloud-hosted PostgreSQL database allows for increased reliability and scalability.
- SQLite on a host path volume
- SQLite on a persistent volume
- PostgreSQL
In this configuration, the database file is stored on one of the cluster worker nodes. In order for all the MCCP pods to be able to access the host volume, they must be placed on the same node. We can enforce this by applying a label to one of the cluster worker nodes:
This label will ensure that the MCCP pods will be deployed and run on the selected node.
If your cluster supports persistent volume storage and has a storage class defined, you can use it to request a persistent volume for the SQLite database file. The exact details of the persistent volume request vary by cluster type and the supported volume types. The following manifest is an example of a configuration of a PersistentVolumeClaim
:
Using a PostgreSQL database does not require any additional setup on the cluster side. The following details are however needed in order to connect:
- Database server hostname
- Database name
- Database user - The database user requires admin privileges on the database server as it will automatically create the necessary schema.
- Database password
The database credentials (user and password) need to be provided separately, before installing the chart, as a secret. Run the following command to create a secret:
#
3. Creating a secret for docker repositoryCreate a secret that contains your docker repository credentials. This secret will be used by Kubernetes during deployment in order to pull down the MCCP images. You can find instructions on how to generate this secret here.
Add this secret to the target namespace. This needs to be the same namespace that the Helm chart will be installed.
If you use a secrets management solution such as Sealed Secrets follow their instructions on how to create a new secret.
Take note of the secret name as you will need to supply it later when installing the chart.
#
4. Create a secret for creating pull requests on your git providerA Personal Access Token is required for the MCCP to create pull requests for new clusters. These tokens need certain permissions (scopes) set. For
- GitHub:
repo
- GitLab:
api
Save the token in secret called git-provider-credentials
in the mccp's deployment namespace:
#
5. Determining the public IP address of the worker nodesYou need to determine the public IP address of the worker nodes of your cluster. This IP address is necessary in order to establish connectivity between agents and your MCCP instance. The way to determine this depends on your cluster type and provisioning method. Take note of that IP address as you will need to supply it later when installing the chart.
info
You may also use a domain name instead of an IP address.
#
6. Installing the Helm chartBefore installing the chart, you need to add the Helm chart repository and then update its local cache. Run the following commands:
Finally install the Helm chart to the target namespace by executing the following command using the Helm CLI (>= v3.5.4
).
- SQLite on a host path volume
- SQLite on a persistent volume
- PostgreSQL
By default, connections to PostgreSQL will use port 5432.
#
7. Checking that MCCP is installed (optional)You should now be able to load the MCCP UI by running the following command:
The MCCP UI should now be accessible at http://localhost:8000
.
#
How to: Install the MCCP CLIThe MCCP CLI allows you to interact with MCCP clusters. You can use mccp
to manage the lifecycle of your infrastructure declaratively using GitOps. The latest version of the MCCP CLI is available in the following links: