Skip to main content

Offline Installation

This document describes how to install Rainbond offline with Helm.

Prerequisites​

  • Install Kubectl CLI
  • Install Helm CLI
  • Install nerdctl CLI
  • Kubernetes 1.24+ cluster with Containerd container runtime
  • Ports 80 443 6060 7070 8443 are available

Offline Installation Rainbond​

Prepare Rainbond offline images and installation package​

  1. Prepare the required images for Rainbond in advance in a networked environment.You can download the required images through the following script.<version> can be viewed in Rainbond Release.
vim download_rbd_images.sh
#!/bin/bash

IMAGE_DOMAIN=registry.cn-hangzhou.aliyuncs.com
IMAGE_NAMESPACE=goodrain
VERSION=<version>

image_list="${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rainbond:${VERSION}
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rbd-chaos:${VERSION}
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rbd-mq:${VERSION}
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rainbond-operator:${VERSION}
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rbd-worker:${VERSION}
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rbd-api:${VERSION}
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rbd-init-probe:${VERSION}
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rbd-monitor:v2.20.0
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/apisix-ingress-controller:1.8.2
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/apisix:3.9.1-debian
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/local-path-provisioner:v0.0.30
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/minio:RELEASE.2023-10-24T04-42-36Z
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/rbd-db:8.0.19
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/registry:2.6.2
${IMAGE_DOMAIN}/${IMAGE_NAMESPACE}/alpine:latest"

for image in ${image_list}; do
nerdctl pull "${image}"
done

nerdctl save -o rainbond-offline-images.tar ${image_list}
  1. Get Rainbond Helm Chart
git clone -b main --depth=1 https://github.com/goodrain/rainbond-chart.git

Start Installation​

  1. Import the pre-prepared image package and Chart package to the target server, and execute the following command to import the images.
nerdctl -n k8s.io load -i rainbond-offline-images.tar
  1. Edit the values.yaml file and fill in the necessary configurations.
vim values.yaml
Cluster:
gatewayIngressIPs: 172.20.251.93 #Cluster ingress IP

nodesForGateway:
- externalIP: 172.20.251.93 #k8s node external IP
internalIP: 172.20.251.93 #k8s node internal IP
name: 172.20.251.93 #k8s node name
# - More nodes for gateway
nodesForChaos:
- name: 172.20.251.93 #k8s node name
# - More nodes for chaos
containerdRuntimePath: /var/run/containerd #containerd.sock file path
Component:
rbd_app_ui:
env:
- name: DISABLE_DEFAULT_APP_MARKET # Disable default open source app store
value: true
  1. Execute the installation command.
helm install rainbond ./rainbond-chart --create-namespace -n rbd-system -f values.yaml
  1. After executing the installation command, execute the following command in the cluster to check the installation status.
watch kubectl get pod -n rbd-system
  1. When the Pod with the name containing rbd-app-ui is in the Running state, the installation is successful.As shown below, when the Pod rbd-app-ui-5577b8ff88-fpnnv is in the Running state, it means Rainbond is successfully installed.
Example of successful installation
NAME                                      READY   STATUS    RESTARTS   AGE
local-path-provisioner-78d88b6df5-wkr84 1/1 Running 0 5m37s
minio-0 1/1 Running 0 5m37s
rainbond-operator-59ff8bb988-nlqrt 1/1 Running 0 5m56s
rbd-api-5466bd748f-brqmv 1/1 Running 0 5m15s
rbd-app-ui-5577b8ff88-fpnnv 1/1 Running 0 4m39s
rbd-chaos-6828h 1/1 Running 0 5m12s
rbd-db-0 1/1 Running 0 5m35s
rbd-gateway-69bfb68f4d-7xd9n 2/2 Running 0 5m34s
rbd-hub-8457697d4c-fqwgn 1/1 Running 0 5m28s
rbd-monitor-0 1/1 Running 0 5m27s
rbd-mq-5b6f94b695-gmdnn 1/1 Running 0 5m25s
rbd-worker-7db9f9cccc-s9wml 1/1 Running 0 5m22s
  1. Access Rainbond using the IP address configured in gatewayIngressIPs, for example: http://172.20.251.93:7070.

  2. If you use the default image repository, you need to modify the configuration of Containerd, configure goodrain.me private image repository.

Using source code build in offline environment (optional)​

Get images​

Prepare the required images for source code build in advance in a networked environment, you can download the required images through the following script.

vim download_rbd_images_sourcebuild.sh
#!/bin/bash
image_list="registry.cn-hangzhou.aliyuncs.com/goodrain/buildkit:v0.12.0
registry.cn-hangzhou.aliyuncs.com/goodrain/builder:stable-amd64
registry.cn-hangzhou.aliyuncs.com/goodrain/runner:stable-amd64
registry.cn-hangzhou.aliyuncs.com/goodrain/rbd-resource-proxy:offline-amd64"

for image in ${image_list}; do
nerdctl pull "${image}"
done

nerdctl save -o rainbond-sourcebuild.tar ${image_list}

Deploy offline source code build service​

  1. Import the image package to the target server
nerdctl -n k8s.io load -i rainbond-sourcebuild.tar
  1. On the rbd-chaos build node, re-tag the images and push them to the private image repository
# login to goodrain.me
nerdctl login -u admin -p admin1234 goodrain.me --insecure-registry

# tag
nerdctl -n k8s.io tag registry.cn-hangzhou.aliyuncs.com/goodrain/builder:stable-amd64 goodrain.me/builder:latest-amd64
nerdctl -n k8s.io tag registry.cn-hangzhou.aliyuncs.com/goodrain/runner:stable-amd64 goodrain.me/runner:latest-amd64
nerdctl -n k8s.io tag registry.cn-hangzhou.aliyuncs.com/goodrain/rbd-resource-proxy:offline-amd64 goodrain.me/rbd-resource-proxy:offline-amd64

# push
nerdctl -n k8s.io push goodrain.me/builder:latest-amd64 --insecure-registry
nerdctl -n k8s.io push goodrain.me/runner:latest-amd64 --insecure-registry
nerdctl -n k8s.io push goodrain.me/rbd-resource-proxy:offline-amd64 --insecure-registry
  1. Deploy rbd-resource-proxy offline source code build service
vim rbd-resource-proxy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
name: rbd-resource-proxy
name: rbd-resource-proxy
namespace: rbd-system
spec:
replicas: 1
selector:
matchLabels:
name: rbd-resource-proxy
template:
metadata:
labels:
name: rbd-resource-proxy
name: rbd-resource-proxy
spec:
containers:
- image: goodrain.me/rbd-resource-proxy:offline-amd64
imagePullPolicy: IfNotPresent
name: rbd-resource-proxy
---
apiVersion: v1
kind: Service
metadata:
labels:
name: rbd-resource-proxy
name: rbd-resource-proxy
namespace: rbd-system
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
name: rbd-resource-proxy
type: NodePort
  1. Get the NodePort port of the rbd-resource-proxy service
kubectl get svc -n rbd-system rbd-resource-proxy
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
rbd-resource-proxy NodePort 10.43.122.71 <none> 80:31980/TCP 8h
  1. Configure the NodePort port and IP obtained above in the following configuration, the IP is the IP of the node where the rbd-resource-proxy service is located
kubectl edit apisixroute lang-proxy -n rbd-system
spec:
http:
- name: lang-proxy
plugins:
- config:
host: 172.20.251.110:31980
scheme: http
kubectl edit apisixupstream -n rbd-system buildpack-upstream
spec:
externalNodes:
- name: 172.20.251.110
port: 31980
type: Domain
scheme: http