Deploying apps to clusters with Satellite Config
Set up a Satellite configuration to automatically deploy your Kubernetes resources to multiple clusters.
Objectives
With Satellite Config UI or CLI, you create a configuration that specifies which Kubernetes resources you want to deploy to a cluster group. Then, the system can automatically deploy these resources across the clusters.
In this tutorial, you create a configuration to deploy a food ordering app, which includes several micro services such as front end, back end, route, and database. After you deploy the version 1 of the food delivery app, you then create a version of app which changes the appearance to use a dark theme.
Audience
This tutorial is for Location administrators who are using Satellite Config to deploy resources for the first time.
Prerequisites
Before you start this tutorial, make sure that you have the following resources in place.
-
A Satellite location for deploying the resources.
-
A Satellite cluster or a Red Hat® OpenShift® cluster on IBM Cloud that is registered with your Satellite location.
-
A Satellite cluster group that contains the clusters you want to deploy resources to.
-
Make sure that Satellite Config has admin access to your clusters. You can either enable admin access when creating the cluster or grant Satellite Config access to your clusters after you create the cluster.
Beginner tutorial: Deploying a hello world app
Follow these steps if you are new to Satellite Config and want to try out the process by deploying some sample resources in an existing IBM Git repo to your clusters.
-
Log in to the Satellite Config UI with your IBM Cloud credentials.
-
Click Create configuration.
-
Select the GitOps - Sample application template and follow the prompts.
Advanced tutorial: Deploying an app and updating it with new versions
Before you begin, delete the subscription created previously in the Beginner tutorial.
-
Log in to GitHub and fork
https://github.com/IBM/satellite-config-example
including all branches. Make sure the Copy the main branch only option is not selected when you create the fork. -
Log in to the Satellite Config UI with your IBM Cloud credentials.
-
Click Create configuration.
-
Select the GitOps template.
-
On the Configuration page:
-
Enter
hello-world-gitops
as the configuration name -
Select
GitHub
as the provider. -
Click Next.
-
-
On the Subscription page:
-
For repository URL, enter the URL of your fork.
-
For Git ref type, select
Branch
. -
For branch name, enter
config-sample-prod
. -
For path, enter
deployments/*.yaml
. -
Select a cluster group or groups to deploy to.
-
Click Next.
-
-
On the Summary page, confirm that the displayed information is correct and then click Complete.
-
Observe the hello world sample version 1.0 being deployed to the clusters. You can click the configuration name to see the rollout status. This sample creates a Hello world app in the
satellite-config-sample
namespace, which serves a simple web page with the current version of the app. Browse to the route of the app to seeHello world 1.0!
. You can get the URL of the app from the OpenShift web console or by using the following command.oc get routes helloworld-route -n satellite-config-sample -o go-template --template='http://{{.spec.host}}{{.spec.path}}{{println}}'`.
-
In GitHub, create a pull request from branch
config-sample-dev
toconfig-sample-prod
. -
Merge the pull request created in the previous step.
-
In a few minutes, observe the hello world sample version 1.1 being deployed to the clusters.