Guides
Install the Deployment Center
All the files required for this document can be downloaded from the following Baidu network disk:
- https://pan.baidu.com/s/1lWLyyT1jAbADGuxEG3m4gA Extraction code: ge4d
Prepare installation packages and environment
-
The existing kubernetes environment supports version 1.17 and above. It is recommended to use version 1.20 and above(if you need to use the longhorn-xxx-deploy package provided by the network disk to deploy Longhorn, you must ensure that the Kubernetes environment version is 1.18 and above; if you need to use the kubernetes-serverless-xxx-deploy package provided by the network disk to deploy the Serverless environment, you must ensure that the Kubernetes environment version is 1.20 and above), and the time set on the Kubernetes node machine is consistent with that on the master node machine (within 30 seconds)
To install the Kubernetes environment, please refer to Install Kubernetes。
-
Resources required for the deployment center:
- Number of CPU cores: 4 cores+
- Memory: 16 GB+
- Hard disk: 200 GB+ (200 GB is the size required for iManager basic data, excluding business data storage)
- Additional resources must be reserved for creating an environment through iManager for Kubernetes
-
supermap-imanager-for-kubernetes-11.2.0-linux-x64.tar.gz has been downloaded
- Address in the network disk: iManager部署包/iManager 11.2.0/iManager for Kubernetes部署包/supermap-imanager-for-kubernetes-11.2.0-linux-x64.tar.gz
-
Prepare the image package (if you can access the Alibaba Cloud warehouse, skip this step)
- Address in the network disk: iManager部署包/iManager 11.2.0/iManager for Kubernetes部署包/supermap-imanager-for-kubernetes-11.2.0-linux-x64-registry-all.tar.gz
- When choosing Helm deployment, a Helm environment is required (where helm commands can be executed)
Install the image repository
Before installing the image repository, run docker version to ensure that Docker has been successfully installed. If you can access the Alibaba Cloud repository, you can skip this step.
-
Place the image package in any directory of the machine (it can be any machine with Docker installed), such as /home/, and decompress it using the following command (if the actual package name is different from the one in the example, replace it with the actual package name when executing the command):
tar -zxf supermap-imanager-for-kubernetes-11.2.0-linux-x64-registry-all.tar.gz
-
Enter the unzipped directory
cd supermap-imanager-for-kubernetes-11.2.0-linux-x64-registry-all
-
Execute the following command in the current directory to install the image library
chmod +x startup.sh && ./startup.sh
-
Verify that the image repository is installed successfully
docker pull <ip>:5000/supermap/scratch:latest-amd64 Parameter description: <ip>is the host IP
If there is no error as shown in the figure below, the startup is successful.
Installation and use of the deployment center
The computer needs to open the port corresponding to “deploy_imanager_deployment_center_port” (default value 31111) in the values.yaml file, 31100 (iManager default port), and 6443, 9101, and 2049 (open when using NFS storage). If you are using Alibaba Cloud ECS server, you need to add the above ports to the security group rules. In addition, you also need to ensure that ports 3307 and 9183 are not occupied.
All the following commands are executed with administrator privileges:
-
Place the installation package supermap-imanager-for-kubernetes-11.2.0-linux-x64.tar.gzin any directory on the host where the Kubernetes master node is located, and decompress it using the following command (if the actual package name is inconsistent with the package name in the example, replace it with the actual package name when executing the command):
tar -zxf supermap-imanager-for-kubernetes-11.2.0-linux-x64.tar.gz
-
Enter the unzipped directory:
cd supermap-imanager-for-kubernetes-11.2.0-linux-x64
-
Execute the following command in the current directory:
vi values.yaml
Modify the values.yaml file according to your needs:
Notes:
- A space is required after the ”:” symbol.
- The values.yaml file can only be set before starting the deployment center. If you need to modify it again, please re-execute the installation script ./startup.sh after modifying it. The file has default values. When modifying, just modify the values directly without removing any configuration. To update the configuration with the Helm command, execute “helm upgrade imanager-deployment-center. -n supermap” in the supermap-imanager-for-kubernetes folder.
# The address of the iManager image repository, used to pull the images required by the deployment center and iManager. The default is the Alibaba Cloud warehouse (this address is recommended when using the internet):registry.cn-beijing.aliyuncs.com; # The intranet warehouse is configured as<ip>:5000,<ip> is the IP address of the machine where the image repository is located (refer to the previous article for the installation method of the image repository). deploy_registry: registry.cn-beijing.aliyuncs.com # Kubernetes master node URL, the default is https://kubernetes.default.svc, usually keep the default; # If the environment is a public cloud such as Alibaba Cloud, you can obtain it by using the kubectl cluster-info command, for example, https://192.168.17.110:6443. deploy_kubernetes_master_url: https://kubernetes.default.svc # The iManager service is deployed to the namespace of Kubernetes. You can keep the default value of supermap or customize it according to actual needs. # When using the Helm command for deployment, you need to create a separate namespace. deploy_namespace: supermap # The namespace name of the image stored in the image repository. The default is supermap and can be customized by users. deploy_image_namespace: supermap # Image pull secret, used for identity authentication when pulling private images. The default value is: image-pull-secret. # If you configure a private repository, when you configure the image to pull the Secret value, you need to create a resource with the same name as the Secret in the namespace where iManager is located in Kubernetes. For details, see Tutorial->Appendix->FAQ->Question 6. deploy_image_pull_secret: image-pull-secret # The port of the deployment center, custom range: 30000-32767, excluding 31234, default 31111. deploy_imanager_deployment_center_port: 31111 # Whether to install service mesh (Istio) to enable the use of service grid functions in iManager, including grayscale release, access control, service metrics, and service tracking functions. The value range is: [true|false]. The default value is false; # If you configure a private repository, install and enable the service mesh feature, you need to create a resource with the same name as the Secret in the namespace where istio-system is located in Kubernetes. For details, see Tutorial->Appendix->FAQ->Question 6. # true: Install the service mesh function, which can be enabled or disabled during visual deployment; # false: The service mesh function is not installed. deploy_istio_enabled: false
After the modification is complete, save and exit: Press the Esc key on the keyboard, enter “:wq” in the command line, and press the Enter key.
- Install the deployment center (the following commands are all executed in the supermap-imanager-for-kubernetes folder)
When installing the deployment center, you can choose to install it using the regular Linux command or the Helm command.
Regular Linux command installation (If Kubernetes cluster unreachable occurs, please refer to Tutorial->Appendix->FAQ 12)
chmod +x startup.sh && ./startup.sh
Helm command installation
(1)Create a command space supermap (can be customized, need to modify the namespace below)
kubectl create ns supermap
(2) Installing the Deployment Center
chmod +x ./helm
./helm install imanager-deployment-center. -n supermap
(3) Check whether the deployment center is installed successfully
./helm list -n supermap
-
Using the Deployment Center
After the deployment center is successfully installed, visit
http://<ip>:31111
to enter the deployment center page and install iManager in the user interface.
<ip>
is the IP of the kubernetes Master node;
31111
is the default port of the deployment center. If the value ofdeploy_imanager_deployment_center_port
in values.yaml is modified, you need to replace it with the actual port.
-
Disable/Enable Deployment Center
You can disable or enable the deployment center by running the following command on the kubernetes master host:
Disable:
kubectl scale deployment imanager-deployment-center --replicas=0 -n<ns>
Enable:
kubectl scale deployment imanager-deployment-center --replicas=1 -n<ns>
Where<ns>is the namespace where the deployment center is located.
To ensure system security, it is recommended that you disable the deployment center after deploying the GIS Cloud Suite and SuperMap iManager. Re-enable it when you need to uninstall or reset the password.
Uninstall the Deployment Center
If iManager has been deployed in the Deployment Center, please go to the Deployment Center first, uninstall iManager, and then perform the following operations;
If you choose to uninstall iManager in “Uninstall but keep data” mode, the data retained by iManager and the sites created will be deleted when you uninstall the Deployment Center.
Regular Linux command uninstall
chmod +x shutdown.sh && ./shutdown.sh
Helm command to uninstall
./helm uninstall imanager-deployment-center -n supermap
Appendix
1.Configure Kubernetes cluster permissions
In an environment without Kubernetes cluster permissions, you can configure permissions to ensure resource security and effective management of operations in the cluster. Specifically, add the following configuration item after deploy_istio_enabled
in the values.yaml file:
# Cluster permission range, value range: [cluster|namespace|custom]. Cluster (cluster) has all permissions, namespace (namespace) can only be operated and used in the namespace configured in the "deploy_namespace" item, and custom (custom) is the permission of the service account (ServiceAccount) you provide yourself;
deploy_service_account_scope:
# When configured as custom, you need to configure "deploy_service_account_name" at the same time, that is, the ServiceAccount created by yourself.
deploy_service_account_name:
Note:
- If the cluster permission range is configured as “namespace”, when installing iManager, select storageClass for the storage method in the storage configuration.
- If the cluster permission range is configured as “namespace”, some iManager functions will be unavailable, including: (1) Kubernetes node information and CPU statistics chart display in the overview interface; (2) If you do not specify a namespace when creating a site, or specify a namespace different from the “deploy_namespace” item, the site cannot be used normally; (3) When starting services in the site, they cannot be automatically allocated to the port range, but only determined by the port configured when creating the site; (4) Storage Management related functions.
- If the cluster permission range is configured as “custom”, you need to ensure that your ServiceAccount has namespace permissions and above. If the permissions are insufficient, iManager deployment will fail, so please be careful when selecting.
- When the cluster permission range is configured with “custom” permission, the deployment center also needs to be deployed in the namespace where your ServiceAccount is located in Kubernetes. That is, the “deploy_namespace” item is configured as the namespace where the ServiceAccount is located. When creating a site in the installed iManager, it needs to be specified in this namespace.