Version: v1.8

VelaUX

VelaUX provides the UI console of KubeVela.

alt

  1. vela addon enable velaux

expected output:

  1. Addon: velaux enabled Successfully.

VelaUX needs authentication. The default username is admin and the password is VelaUX12345. Please must set and remember the new password after the first login.

By default, VelaUX didn’t have any exposed port.

Port forward will work as a proxy to allow visiting VelaUX dashboard by local port.

  1. vela port-forward addon-velaux -n vela-system 8000:8000

There are three service types for VelaUX addon which aligned with Kubernetes service, they’re ClusterIP, NodePort and LoadBalancer.

By default the service type is ClusterIP for security.

If you want to expose your VelaUX dashboard for convenience, you can specify the service type.

  • LoadBalancer type requires your cluster has cloud LoadBalancer available.

    1. vela addon enable velaux serviceType=LoadBalancer
  • NodePort type requires you can access the Kubernetes Node IP/Port.

    1. vela addon enable velaux serviceType=NodePort

After the service type specified to LoadBalancer or NodePort, you can obtain the access address through vela status:

  1. vela status addon-velaux -n vela-system --endpoint

The expected output:

  1. +---------+---------------+-----------------------------------+--------------------------------+-------+
  2. | CLUSTER | COMPONENT | REF(KIND/NAMESPACE/NAME) | ENDPOINT | INNER |
  3. +---------+---------------+-----------------------------------+--------------------------------+-------+
  4. | local | velaux-server | Service/vela-system/velaux-server | velaux-server.vela-system:8000 | true |
  5. +---------+---------------+-----------------------------------+--------------------------------+-------+

If you have ingress and domain available in your cluster, you can also deploy VelaUX by specifying a domain like below:

  1. vela addon enable velaux domain=example.domain.com

The expected output:

  1. I0112 15:23:40.428364 34884 apply.go:106] "patching object" name="addon-velaux" resource="core.oam.dev/v1beta1, Kind=Application"
  2. I0112 15:23:40.676894 34884 apply.go:106] "patching object" name="addon-secret-velaux" resource="/v1, Kind=Secret"
  3. Addon: velaux enabled Successfully.
  4. Please access the velaux from the following endpoints:
  5. +-----------------------------------+---------------------------+
  6. | REF(KIND/NAMESPACE/NAME) | ENDPOINT |
  7. +-----------------------------------+---------------------------+
  8. | Ingress/vela-system/velaux-server | http://example.domain.com |
  9. +-----------------------------------+---------------------------+

If you enabled the traefik addon, you can set the gatewayDriver parameter to use the Gateway API.

  1. vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik

If you want to enable VelaUX with SSL:

  1. Create the certificate configuration:
  1. apiVersion: core.oam.dev/v1beta1
  2. kind: Application
  3. metadata:
  4. annotations:
  5. config.oam.dev/alias: "VelaUX SSL Certificate"
  6. labels:
  7. app.oam.dev/source-of-truth: from-inner-system
  8. config.oam.dev/catalog: velacore-config
  9. config.oam.dev/type: config-tls-certificate
  10. name: velaux-cert
  11. namespace: vela-system
  12. spec:
  13. components:
  14. - name: velaux
  15. properties:
  16. cert: <CERT_BASE64>
  17. key: <KEY_BASE64>
  18. type: config-tls-certificate

Please make sure the certificate matches the domain.

  1. Enable VelaUX with domain
  1. vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik secretName=velaux-cert

VelaUX supports Kubernetes and MongoDB as the database. the default is Kubernetes. We strongly advise using the MongoDB database to power your production environment.

  1. vela addon enable velaux dbType=mongodb dbURL=mongodb://<MONGODB_USER>:<MONGODB_PASSWORD>@<MONGODB_URL>

You can also deploy the MongoDB with this application configuration:

Your cluster must have a default storage class.

  1. apiVersion: core.oam.dev/v1beta1
  2. kind: Application
  3. metadata:
  4. name: velaux-db
  5. namespace: vela-system
  6. spec:
  7. components:
  8. - name: velaux-db
  9. properties:
  10. chart: mongodb
  11. repoType: helm
  12. url: https://charts.bitnami.com/bitnami
  13. values:
  14. persistence:
  15. size: 20Gi
  16. version: 12.1.12
  17. type: helm
  18. policies:
  19. - name: vela-system
  20. properties:
  21. clusters:
  22. - local
  23. namespace: vela-system
  24. type: topology
  25. workflow:
  26. steps:
  27. - name: vela-system
  28. properties:
  29. policies:
  30. - vela-system
  31. type: deploy

After deployment, let’s get the root password from the secret vela-system/velaux-db-mongodb.

By default the image repo is docker hub, you can specify the image repo by the repo parameter:

  1. vela addon enable velaux repo=acr.kubevela.net

You can try to specify the acr.kubevela.net image registry as an alternative, It’s maintained by KubeVela team, and we will upload/sync the built-in addon image for convenience.

This feature can also help you to build your private installation, just upload all images to your private image registry.

VelaUX is an addon on top of KubeVela, it works as UI console for KubeVela, while it’s also an out-of-box platform for end-user.

We add some more concepts for enterprise integration.

alt

Project is where you manage all the applications and collaborate with your team member. Project is one stand alone scope that separates it from other project.

Environment refers to the environment for development, testing, and production and it can include multiple Delivery Targets. Only applications in the same environment can visit and share resource with each other.

  • Bind Application with Environment The application can be bound to multiple Environments, and for each environment, you can set the unique parameter difference for each environment.

Delivery Target describes the space where the application resources actually delivered. One target describes one Kubernetes cluster and namespace, it can also describe a region or VPC for cloud providers which includes shared variables and machine resources.

Kubernetes cluster and Cloud resources are currently the main way for KubeVela application delivery. In one target, credentials of cloud resources created will automatically delievered to the Kubernetes cluster.

An application in VelaUX is a bit different with KubeVela, we add lifecycle includes:

  • Create an application is just create a metadata records, it won’t run in real cluster.
  • Deploy an application will bind with specified environment and instantiate application resource into Kubernetes clusters.
  • Recycle an application will delete the instance of the application and reclaim its resources from Kubernetes clusters.
  • Delete an application is actually delete the metadata.

The rest concept in VelaUX Application are align with KubeVela Core.

Last updated on May 6, 2023 by Tianxin Dong