ibm-ucv-prod
IBM DevOps Velocity Documentation For additional details regarding install and use of product see here https://www.ibm.com/support/knowledgecenter/SSCKX6 License By installing this product you accept the following license terms: https://github.com/UrbanCode/velocity/blob/master/LICENSE
About this chart
CASE Bundle for IBM DevOps Velocity (ibm-ucv-prod)
Introduction
IBM DevOps Velocity is a DevOps and value stream management tool to help you understand your DevOps practices, implement changes, review change impact, and automate release processes.
Chart Details
This chart deploys a single instance of IBM DevOps Velocity.
- 9 backend microservices
- 3 frontend microservices
- Single AMQP (Advanced Message Queuing Protocol) StatefulSet
- NGINX for inter-service routing
- Exposed externally via Ingress
Prerequisites
- Kubernetes - use this tool to check which versions are supported
- MongoDB Database - may be running in your cluster or outside of it. Need to provide the mongo connection string for a user with database create permissions.
- Permissions: The installing user needs Cluster Admin privileges in order to install the Argo framework.
- Configuration scripts (see below)
Configuration Scripts
The scripts below are for ibm_cloud_pak
- common
- Scripts to check existence of security policy/context
- post-delete
- clusterAdministration
- deleteSecurityClusterPrereqs.sh
- namespaceAdministration
- deleteSecurityNamespacePrereqs.sh
- clusterAdministration
- post-install
- namespaceAdministration
- deleteSecretGenerationJobs.sh
- namespaceAdministration
- pre-install
- clusterAdministration
- createSecurityClusterPrereqs.sh
- namespaceAdministration
- createSecurityNamespacePrereqs.sh
- createSecretNamespacePrereqs.sh
- createImagePolicyNamespacePrereqs.sh
- clusterAdministration
PodSecurityPolicy Requirements
This chart requires a PodSecurityPolicy to be bound to the target namespace prior to installation. To meet this requirement there may be cluster scoped as well as namespace scoped pre and post actions that need to occur.
The predefined PodSecurityPolicy named ibm-restricted-psp has been verified for this chart, if your target namespace is bound to this PodSecurityPolicy you can proceed to install the chart.
This chart also defines a custom PodSecurityPolicy which can be used to finely control the permissions/capabilities needed to deploy this chart. You can enable this custom PodSecurityPolicy using the Cluster Console user interface or the supplied instructions/scripts in the pak_extension pre-install directory.
- From the user interface, you can copy and paste the following snippets to enable the custom PodSecurityPolicy
- Custom PodSecurityPolicy definition:
apiVersion: extensions/v1beta1 kind: PodSecurityPolicy metadata: name: ibm-ucv-prod-psp spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: false allowedCapabilities: - CHOWN - DAC_OVERRIDE - SETGID - SETUID - NET_BIND_SERVICE seLinux: rule: RunAsAny supplementalGroups: rule: RunAsAny runAsUser: rule: RunAsAny fsGroup: rule: RunAsAny volumes: - configMap - secret - Custom ClusterRole for the custom PodSecurityPolicy:
apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: ibm-ucv-prod-clusterrole rules: - apiGroups: - extensions resourceNames: - ibm-ucv-prod-psp resources: - podsecuritypolicies verbs: - use
- Custom PodSecurityPolicy definition:
SecurityContextConstraints Requirements
This chart requires a SecurityContextConstraints to be bound to the target namespace prior to installation. To meet this requirement there may be cluster scoped as well as namespace scoped pre and post actions that need to occur.
The predefined SecurityContextConstraints name: ibm-restricted-scc has been verified for this chart, if your target namespace is bound to this SecurityContextConstraints resource you can proceed to install the chart.
This chart also defines a custom SecurityContextConstraints which can be used to finely control the permissions/capabilities needed to deploy this chart. You can enable this custom SecurityContextConstraints resource using the supplied instructions/scripts in the pak_extension pre-install directory.
-
From the user interface, you can copy and paste the following snippets to enable the custom SecurityContextConstraints
- Custom SecurityContextConstraints definition:
apiVersion: security.openshift.io/v1 kind: SecurityContextConstraints allowPrivilegedContainer: false allowHostDirVolumePlugin: false allowHostIPC: false allowHostNetwork: false allowHostPID: false allowHostPorts: false metadata: name: ibm-ucv-prod-scc readOnlyRootFilesystem: false allowHostPID: false allowedCapabilities: - CHOWN - DAC_OVERRIDE - SETGID - SETUID - NET_BIND_SERVICE supplementalGroups: type: MustRunAs ranges: - max: 65535 min: 1 runAsUser: type: MustRunAsRange seLinux: type: MustRunAs seLinuxContext: type: MustRunAs fsGroup: type: MustRunAs ranges: - max: 65535 min: 1 volumes: - configMap - secret
- Custom SecurityContextConstraints definition:
-
From the command line, you can run the setup scripts included under pak_extensions when running the namespace scripts add the namespace as argument
As a cluster admin the pre-install instructions are located at:
pre-install/clusterAdministration/createSecurityClusterPrereqs.sh
As team admin the namespace scoped instructions are located at:
pre-install/namespaceAdministration/createSecurityNamespacePrereqs.shpre-install/namespaceAdministration/createSecretNamespacePrereqs.shpre-install/namespaceAdministration/createImagePolicyNamespacePrereqs.sh
Resources Required
The minimal system resources required:
- CPU: 8 vCPU (virtual CPUs)
- Memory: 12 GB
- Storage: 20 GB
Installing the Chart
To install the chart with the release name my-release:
helm install my-release --set license=accept --set access.key=$ACCESS_KEY --set url.domain=localhost ibm-marketplace/ibm-ucv-prod
The above command sets license, access key and domain name parameters. Other parameters may also be required. If parameters aren't specifed with the --set flag, their values will default to the values specified in the values.yaml file.
The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
- Generally teams have subsections for:
- Verifying the Chart
- Uninstalling the Chart
Verifying the Chart
See the instruction (from NOTES.txt within chart) after the helm installation completes for chart verification. The instruction can also be viewed by running the command: helm status my-release.
Uninstalling the Chart
To uninstall/delete the my-release deployment:
helm delete my-release
Cleanup any pre-reqs that were created
If cleanup scripts were included in the pak_extensions/post-delete directory; run them to cleanup namespace and cluster scoped resources when appropriate.
Configuration
The helm chart has the following values. They can be overwritten using the --set key=value[,key=value] argument to helm install.
| Parameter | Description | Default |
|---|---|---|
license | Enter 'accept' to indicate that you accept all terms and conditions of the End User License Agreement (EULA). | true |
access.key | The access key obtained with the sign up or purchase of DevOps Velocity. This key is required to start Velocity and contains information such as the Velocity Edition and Trial vs Permanent. | invalid-key |
url.protocol | The protocol of the Velocity URL. Only https is supported. | https |
url.domain | The domain name users will access Velocity at. This is usually the ingress host name or the hostname of your kubernetes master node. If you have any reverse proxy in front of your kubernetes cluster, use that. | localhost |
url.port | The port users will use to access the app. If you have any reverse proxy in front of your kubernetes cluster, use that. | 32443 |
rabbitmq.url | The URL that services will use to authenticate against RabbitMQ. Should be of form amqp://<rabbit-username>:<rabbit-password>@<rabbit-service-name/URL>:<rabbit-port>/<optional-v_host>. The username and password should match what is entered below. | amqp://rabbit:carrot@velocity-rabbitmq:5672/ |
rabbitmq.nodePort | The port that RabbitMQ will be exposed outside the cluster on. This will be used by external tools that rely on RabbitMQ to communicate with Velocity such as Jenkins. | 31672 |
rabbitmq.managerPort | The port that the RabbitMQ administrative console will run on. This is not exposed outside of the cluster. | 15672 |
rabbitmq.erlangCookie | The cookie used by RabbitMQ and services to determine whether they are allowed to communicate with each other. | 128ad9b8-3d9f-11e8-b467-0ed5f89f718c |
loglevel | The loggin level for all services to use. Possible values are ALL > DEBUG > INFO > WARN > ERROR > FATAL > OFF. | ALL |
ingress.enable | Set to true if you want ingress rules set up, otherwise set to false. If you are using NodePort or an ingress of your own, then set to false. | true |
ingress.path | The path that ingress will serve Velocity on. | / |
secrets.rabbit | The name of the Kubernetes Secret to store sensetive RabbitMQ information. Will be created dynamically if it does not exist. | velocity-rabbitmq |
secrets.tls | The name of the Kubernetes Secret containing TLS certificate information. Will be created dynamically if it does not exist. | velocity-tls |
secrets.tokens | The name of the Kubernetes Secret to store sensetive Velocity tokens. Will be created dynamically if it does not exist. | velocity-tokens |
secrets.database | The name of the Kubernetes Secret to store sensetive MongoDB information. Will be created dynamically if it does not exist. | velocity-database |
Tip: You can use the default values.yaml
Storage
There are no permanent storage solutions required.
Limitations
- Only supported on
amd64architecture.
Identity and Access Management
User Authentication and Authorization Strategy
The DevOps Velocity authentication strategy includes browser cookies and user access key for API usage. Authorization resolves tenant permissions according to roles and teams.
Integrations
DevOps Velocity supports LDAP and header based SSO integrations. LDAP roles are supported and roles passed via SSO header.
Administration and Management
User authentication and authorization is intended to be managed from the UI. Management through an API is also possible.
Audit
User audit records are found in the "audit_log" collection in the "security" database.
Backup and Recovery
DevOps Velocity can be fully backed-up as a restore point by capturing the following:
- Database: This should be a single MongoDB instance containing multiple MongoDB databases per service.
- Environmental variables (secrets): these may affect, for instance - encryption, access, and operation.
For database and environment variable secrets management strategies, it is both risky and difficult to prescribe a one-size fits all solution for either or both plans. Refer to industry and company specific best practices that best apply per use case. Common approaches to database backup include the backup of persistent volumes either with or without using MongoDBs unique built-in tooling. Environmental variables and secrets, both critical and sensitive, should both be treated like passwords that are lightweight and easily backed-up by simple copying.
The following is a simple back-up and restore example:
-
Backup the Database (Refer to MongoDB documentation for details https://docs.mongodb.com/manual/tutorial/backup-and-restore-tools/)
-
Run MongoDBs
mongodumpcommand against DevOps Velocity's MongoDB instance (this command can execute against a remote instance). For example:mongodump --host=mongoInstanceAddress --port=27017 --out=/opt/backup/velocity-2020-7-4 -
Move (archive) the dump file to a secure location.
-
To restore a dump file run
mongorestore.NOTE:
mongorestoreby default only adds and does not remove database data. To entirely restore a database to a restore point, either delete all databases before running, or run with the--dropflag. For example:mongorestore --host mongoInstanceAddress --port 27017 --drop /backup/dump
-
-
Backup and restore environmental variables (secrets)
- Copy all deployment secrets to a secure location.
- To restore values, copy them back into production as needed.
Scaling Services
Some services can be scaled with performance improvements, others cannot. See the list of services below for a summary as of Velocity 2.0.0:
Service Containers
The following services can be scaled with expected performance improvements:
- multi-app-pipeline-api
- release-events-api
- reporting-consumer
- security-api
The following services should not be scaled, but might be scaled in future releases of Velocity:
- application-api
- continuous-release-consumer
- continuous-release-poller
The following services are not expected to provide performance gains, and therefore are not recommended for scaling.
- release-events-ui
- continuous-release-ui
- rcl-web-client
Non-service containers
Do not scale the rabbit container:
- rabbitnode1
Scaling of velocity router
Deploy ibm-ucv-prod with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-ucv-prod 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 chartibm-ucv-prod is pinned at v5.3.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