Skip to main content

One-Click Deployment

1. Start Deployment

The following commands are used for quick deployment of CSGHub and all dependency components. Choose the corresponding command according to your server's network environment. After execution, the entire deployment process will be completed automatically without manual intervention.

curl -sfL http://quick-install.opencsg.com | bash -s -- --domain csghub.example.com

For domestic environments (no public network or slow access to overseas resources), it is recommended to use the following command, which will automatically enable domestic mirror acceleration to improve deployment efficiency:

curl -sfL http://quick-install.opencsg.com | bash -s -- --domain csghub.example.com --install-cn

2. Deployment Instructions

The one-click deployment script will automatically complete all the following operations without manual configuration. The entire process is fully automated:

  • Install K3s Kubernetes cluster to build a lightweight and efficient container runtime environment as the foundation for CSGHub operation
  • Configure NFS shared storage (RWX dynamic PV) to solve multi-Pod data sharing requirements and ensure storage stability
  • Install NVIDIA container runtime to prepare the environment for subsequent GPU support (does not affect deployment when GPU is not enabled)
  • Install CSGHub-dependent CRDs (Custom Resource Definitions) to ensure normal linkage of application components
  • Deploy CSGHub Enterprise Edition to complete installation and configuration of core application components
  • Initialize database resources and configure the database environment required by the application to ensure normal data storage and access
  • Configure private image repository to ensure normal pulling and updating of application images
  • Configure K3s private repository authentication to solve permission issues for pulling private images
  • Restart K3s to make all configurations take effect and ensure normal linkage between the cluster and the application
  • Configure local domain resolution for convenient access to the CSGHub application through a custom domain

3. More Installation Examples

According to actual business needs, you can add corresponding parameters to the deployment command to achieve personalized deployment. The following are common scenario examples:

3.1 Enable GPU Support

If the server is equipped with an NVIDIA graphics card, GPU support needs to be enabled to meet high-performance requirements such as model training and inference. Execute the following command:

Shell

curl -sfL http://quick-install.opencsg.com | bash -s -- --domain csghub.example.com --enable-gpu

Notes:

  • Automatically installs NVIDIA driver dependencies and container runtime configuration without manual driver installation
  • Starts the nvidia-device-plugin plugin to enable Kubernetes cluster management and scheduling of GPU resources
  • Automatically labels nodes with GPU capability tags so that the CSGHub application can identify and utilize GPU resources

3.2 Enable CSGShip

CSGShip is used to implement extended functions such as image management and container scheduling. Execute the following command when this feature needs to be enabled:

Shell

curl -sfL http://quick-install.opencsg.com | bash -s -- --domain csghub.example.com --extra-args "--set csgship.enabled='true'"

3.3 Expose Service via NodePort

The default service exposure method after deployment can be adjusted according to the cluster environment. To expose the service via NodePort, execute the following command:

Shell

curl -sfL http://quick-install.opencsg.com | bash -s -- --domain csghub.example.com --extra-args "--set global.gateway.service.type=='NodePort'"

4. Status Verification

After deployment is complete, you can verify the deployment status through the following commands to confirm that the application and related components are running normally:

4.1 Check Installation Status

Execute the following commands to view the running status of core resources such as cluster, Pods, and Services to ensure there are no abnormalities:

Shell

kubectl get nodes
kubectl get pods -A
kubectl get svc -n csghub
kubectl get gc
kubectl get gtw -n csghub
kubectl get httproutes -n csghub

4.2 View Installation Logs

All operation logs during deployment are recorded in the quick-install.log file. If any exceptions occur during deployment, you can view the log to troubleshoot issues:

Shell

cat ./quick-install.log

4.3 View Access Information

After deployment is complete, key information required for access will be automatically generated in the login.txt file. Execute the following command to view it:

Shell

cat ./login.txt

The file content includes:

  • CSGHUB Login Address: Used to access the CSGHub management interface through a browser
  • Administrator Account and Password: Default administrator account information for first-time system login
  • Key Service Endpoints: Access addresses of core application services for subsequent maintenance and debugging

5. Instance Upgrade

CSGHub supports one-click upgrade. The upgrade command is exactly the same as the installation command. The script will automatically detect the current version and upgrade to the latest stable version. Currently, installing a specific version is not supported. After upgrading, the current application configuration will be overwritten (data will not be lost).

6. Common Issues

If exceptions occur during deployment, you can refer to the following solutions for troubleshooting:

6.1 Script Execution Failure

If direct execution through pipe fails, download the script locally first and then execute the deployment to facilitate troubleshooting specific errors:

Shell

curl -sfL http://quick-install.opencsg.com -o quick-install.sh
bash quick-install.sh --domain csghub.example.com

6.2 Domain Cannot Be Resolved

If you cannot access CSGHub through the custom domain after deployment, manually add local domain resolution to temporarily solve the access issue:

Shell

echo "$(hostname -I | awk '{print $1}') csghub.example.com" >> /etc/hosts

6.3 Port Conflict

If a port conflict is prompted during deployment, first check the current port usage, troubleshoot the conflicting port and release it:

Shell

netstat -tulpn | grep :22

6.4 Error on line 138: Command [bash -c "$cmd"]

If the above error is prompted during script execution, accompanied by [WARN] Retry related logs, no manual intervention is needed. The program will automatically retry the failed command. Please wait patiently for the retry to complete.