console
by Stratos
A Helm chart for deploying Stratos
About this chart
Stratos
Stratos is an Open Source Web-based Management console for Cloud Foundry. It allows users and administrators to both manage applications running in the Cloud Foundry cluster and perform cluster management tasks.
Installation
Stratos can be installed to a Kubernetes cluster using Helm. Either Helm 2 or Helm 3 can be used, although we recommend using the newer Helm 3 version.
Ensure the Helm client and kubectl CLIs are installed. If you are using Helm 2, ensure you've initialized Tiller into your cluster with the appropriate Service Account.
The Helm chart is published to the Stratos Helm repository.
You will need to have the Stratos Helm repository added to your Helm setup, if you do not, run:
helm repo add stratos https://cloudfoundry.github.io/stratos
Check the repository was successfully added by searching for the console, for example:
helm search repo console
NAME CHART VERSION APP VERSION DESCRIPTION
stratos/console 4.3.0 4.3.0 A Helm chart for deploying Stratos UI Console
Note: Version numbers will depend on the version of Stratos available from the Helm repository
Note: Commands shown in this document are for Helm version 3. For Helm version 2, when installing, instead of supplying the name via the
--nameflag, it is supplied as the first argument, before the chart name.
To install Stratos:
kubectl create namespace console
helm install my-console stratos/console --namespace=console
Note: The first
kubectlcommand will create a namespace for Stratos. With Helm 3 you must create a namespace before installing. We recommend installing Stratos into a separate namespace.
Note: This assumes that a storage class exists in the Kubernetes cluster that has been marked as
default. If no such storage class exists, a specific storage class needs to be specified, please see the following section Specifying a custom Storage Class.
You can change the namespace (--namespace) and the release name to values of your choice.
This will create a Stratos instance named my-console in a namespace called console in your Kubernetes cluster.
After the install, you should be able to access the Console in a web browser by following the instructions below.
Advanced installation topics are covered in the the Advanced Topics section below.
Helm Chart Configuration
The following table lists the configurable parameters of the Stratos Helm chart and their default values.
| Parameter | Description | Default |
|---|---|---|
| imagePullPolicy | Image pull policy | IfNotPresent |
| console.sessionStoreSecret | Secret to use when encrypting session tokens | auto-generated random value |
| console.ssoLogin | Whether to enable SSO Login and use the UAA Login UI instead of the built-in one | false |
| console.ssoOptions | Advanced options to customize the SSO experience | |
| console.ssoAllowList | List of permitted redirect URLs for SSO authentication | |
| console.backendLogLevel | Log level for backend (info, debug) | info |
| console.service.externalIPs | External IPs to add to the console service | [] |
| console.service.loadBalancerIP | IP address to assign to the load balancer for the metrics service (if supported) | |
| console.service.loadBalancerSourceRanges | List of IP CIDRs allowed access to load balancer (if supported) | [] |
| console.service.type | Service type for the console (ClusterIP, NodePort, LoadBalancer, ExternalName etc) | ClusterIP |
| console.service.servicePort | Service port for the console service | 443 |
| console.service.externalName | External name for the console service when service type is ExternalName | |
| console.service.nodePort | Node port to use for the console service when service type is NodePort or LoadBalancer | |
| console.service.ingress.enabled | Enable ingress for the console service | false |
| console.service.ingress.host | Host for the ingress resource | |
| console.service.ingress.secretName | Name of an existing secret containing the TLS certificate for ingress | |
| console.service.http.enabled | Enabled HTTP access to the console service (as well as HTTPS) | false |
| console.service.http.servicePort | Service port for HTTP access to the console service when enabled | 80 |
| console.service.http.nodePort | Node port for HTTP access to the console service (as well as HTTPS) | |
| console.templatesConfigMapName | Name of config map that provides the template files for user invitation emails | |
| console.userInviteSubject | Email subject of the user invitation message | |
| console.techPreview | Enable/disable Tech Preview features | false |
| console.apiKeysEnabled | Enable/disable API key-based access to Stratos API (disabled, admin_only, all_users) | admin_only |
| console.ui.listMaxSize | Override the default maximum number of entities that a configured list can fetch. When a list meets this amount additional pages are not fetched | |
| console.ui.listAllowLoadMaxed | If the maximum list size is met give the user the option to fetch all results | false |
| console.localAdminPassword | Use local admin user instead of UAA - set to a password to enable | |
| console.tlsSecretName | Secret containing TLS certificate to use for the Console | |
| console.mariadb.external | Use an external database instead of the built-in MariaDB | false |
| console.mariadb.database | Name of the database to use | console |
| console.mariadb.user | Name of the user for accessing the database | console |
| console.mariadb.userPassword | Password of the user for accessing the database. Leave blank for the built-in database to generate a random password | |
| console.mariadb.rootPassword | Password of the root user for accessing the database. Leave blank for the built-in database to generate a random password | |
| console.mariadb.host | Hostname of the database when using an external db | |
| console.mariadb.port | Port of the database when using an external db | 3306 |
| console.mariadb.tls | TLS mode when connecting to database (true, false, skip-verify, preferred) | false |
| console.artifactHubDisabled | Disable the Helm Artifact Hub Endpoint | false |
| uaa.endpoint | URL of the UAA endpoint to authenticate with | |
| uaa.consoleClient | Client to use when authenticating with the UAA | cf |
| uaa.consoleClientSecret | Client secret to use when authenticating with the UAA | |
| uaa.consoleAdminIdentifier | Scope that identifies an admin user of Stratos (e.g. cloud_controller.admin | |
| uaa.skipSSLValidation | Skip SSL validation when when authenticating with the UAA | false |
| env.SMTP_AUTH | Authenticate against the SMTP server using AUTH command when Sending User Invite emails | false |
| env.SMTP_FROM_ADDRESS | From email address to use when Sending User Invite emails | |
| env.SMTP_USER | User name to use for authentication when Sending User Invite emails | |
| env.SMTP_PASSWORD | Password to use for authentication when Sending User Invite emails | |
| env.SMTP_HOST | Server host address to use for authentication when Sending User Invite emails | |
| env.SMTP_PORT | Server port to use for authentication when Sending User Invite emails | |
| kube.auth | Set to "rbac" if the Kubernetes cluster supports Role-based access control | "rbac" |
| kube.organization | Registry organization to use when pulling images | |
| kube.registry.hostname | Hostname of registry to use when pulling images | docker.io |
| kube.registry.username | Username to use when pulling images from the registry | |
| kube.registry.password | Password to use when pulling images from the registry | |
| console.podAnnotations | Annotations to be added to all pod resources | |
| console.podExtraLabels | Additional labels to be added to all pod resources | |
| console.statefulSetAnnotations | Annotations to be added to all statefulset resources | |
| console.statefulSetExtraLabels | Additional labels to be added to all statefulset resources | |
| console.deploymentAnnotations | Annotations to be added to all deployment resources | |
| console.deploymentExtraLabels | Additional labels to be added to all deployment resources | |
| console.jobAnnotations | Annotations to be added to all job resources | |
| console.jobExtraLabels | Additional labels to be added to all job resources | |
| console.service.annotations | Annotations to be added to all service resources | |
| console.service.extraLabels | Additional labels to be added to all service resources | |
| console.service.ingress.annotations | Annotations to be added to the ingress resource | |
| console.service.ingress.extraLabels | Additional labels to be added to the ingress resource | |
| console.sslProtocols | SSL Protocols to use for the nginx configuration | TLSv1.2 TLSv1.3 |
| console.sslCiphers | SSL Ciphers to use for the nginx configuration | HIGH:!aNULL:!MD5 |
| console.nodeSelector | Node selectors to use for the console Pod | |
| mariadb.nodeSelector | Node selectors to use for the database Pod | |
| configInit.nodeSelector | Node selectors to use for the configuration Pod |
Accessing the Console
To check the status of the instance use the following command:
helm status my-console
Note: Replace
my-consolewith the value you used for thenameparameter, or if you did not provide one, use thehelm listcommand to find the release name that was automatically generated for you.
The console is exposed via an HTTPS service - RELEASE-NAME-ui-ext (where RELEASE-NAME is the name used for the name parameter when installing). You can find the details of this service with:
kubectl get services -n NAMESPACE
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-console-mariadb ClusterIP 10.105.216.25 <none> 3306/TCP 60s
my-console-ui-ext NodePort 10.109.207.70 <none> 443:31067/TCP 60s
In this example, Stratos has been deployed withe the service configured as
NodePort.
The URL you use for accessing Stratos will depend on the service configuration and the environment that you have used.
Note: If you did not provide a certificate when installing, Stratos will use a self-signed certificate, so you will see a certificate warning which you access Stratos in a browser.
Upgrading your deployment
To upgrade your instance when using the Helm repository, fetch any updates to the repository:
helm repo update
To update an instance, the following assumes your instance is called my-console:
helm upgrade my-console stratos/console
After the upgrade, perform a helm list to ensure your console is the latest version.
Uninstalling
To uninstall Stratos, delete the Helm release and also delete the Kubernetes namespace:
helm delete my-console --purge
kubectl delete namespace console
Note: Stratos creates secrets in the namespace as part of an initialization job. These are not managed by Helm, so make sure you delete the namespace to remove these secrets.
Advanced Topics
Using a Load Balancer
If your Kubernetes deployment supports automatic configuration of a load balancer (e.g. Google Container Engine), specify the parameters console.service.type=LoadBalancer when installing.
kubectl create namespace console
helm install my-console stratos/console --namespace=console --set console.service.type=LoadBalancer
Using an Ingress Controller
Bare minimum Stratos deployment with an Ingress
- Deploy
ingress-nginxIngress controller into your Kubernetes cluster using the Helm chart or Kubernetes spec files. - Create
values.yamlwith the following Stratos Helm chart configuration values:
console:
service:
ingress:
enabled: true
- Install Stratos:
helm repo add stratos https://cloudfoundry.github.io/stratos
kubectl create namespace console
helm install my-console stratos/console --namespace=console --values values.yaml
- Obtain Ingress address by running
kubectl get ingress --namespace=console, your Stratos installation should be accessible at that address.
Note that configuration above would result in a deployment with self-signed HTTPS certificates and Stratos service being a default backend for the Ingress. The following steps most likely would be required for a production deployment:
- Acquire a static IP address for the Ingress.
- Assign a domain name to the static IP via a DNS record and set
console.service.ingress.hostvalue. - Create a Kubernetes secret containing valid HTTPS certificates for the domain and set
console.service.ingress.secretNamevalue.
Ingress configuration
If your Kubernetes Cluster supports Ingress, you can expose Stratos through Ingress by supplying the appropriate ingress configuration when installing.
This configuration is described below:
| Parameter | Description | Default |
|---|---|---|
| console.service.ingress.enabled | Enables ingress | false |
| console.service.ingress.annotations | Annotations to be added to the ingress resource. | {} |
| console.service.ingress.extraLabels | Additional labels to be added to the ingress resource. | {} |
| console.service.ingress.host | The host name that will be used for the Stratos service. | |
| console.service.ingress.secretName | The existing TLS secret that contains the certificate for ingress. |
If console.service.ingress.host isn't provided, Stratos service will be used as the default backend.
By default a certificate will be generated for TLS. You can provide your own certificate by creating a secret and specifying this with console.service.ingress.secretName.
Note: If you do not supply
console.service.ingress.hostbut do supplyenv.DOMAINthen the hostconsole.[env.DOMAIN]will be used.
Deploying from a Private Image Repository
If the images used by the chart are hosted in a private repository, the following needs to be specified. Save the following to a file called private_overrides.yaml. Replace REGISTRY USER PASSSWORD, REGISTRY USERNAME, REGISTRY URL with the appropriate values. `
Deploy console with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has console on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartconsole is pinned at v4.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply