Quick Installation via Ocboot
Use ocboot deployment tool to deploy Cloudpods CMP multi-cloud management version in All in One mode.
Prerequisites
The content in this chapter is to quickly deploy Cloudpods service through the deployment tool. If you want to deploy a highly available cluster in a production environment, please refer to: High Availability Installation.
Environment Preparation
Machine Configuration Requirements
- Operating System: Supported distributions vary depending on CPU architecture. The current situation of supported distributions is as follows:
- CentOS 7.6~7.9 Minimal: Supports x86_64 and arm64
- Debian 10/11: Supports x86_64 and arm64
- Ubuntu 22.04: Supports only x86_64
- Kylin V10 SP2: Supports x86_64 and arm64
- Deepin UOS kongzi: Supports x86_64 and arm64
- The operating system needs to be a clean version, as the deployment tool will build the specified version of Kubernetes cluster from scratch. Ensure that the system does not have container management tools such as Kubernetes and Docker installed, otherwise conflicts may occur and cause installation abnormalities.
- Minimum system requirements: CPU 4 cores, 8GiB memory, 100GiB storage.
- The storage paths used by virtual machines and services are both under /opt directory. Thus, it is recommended to set up a separate mount point for the /opt directory in an ideal environment.
- For example, create a separate partition for /dev/sdb1 and format it as ext4, then mount it to the /opt directory through /etc/fstab.
Install Ansible and Git
First, you need to install ansible and git. The minimum required version of Ansible is 2.11.12
.
- CentOS 7
- Debian 10/11
- Kylin V10
- Other Operating Systems
# Install ansible and git locally
$ yum install -y epel-release git python3-pip
$ python3 -m pip install --upgrade pip setuptools wheel
$ python3 -m pip install 'ansible<=9.0.0'
If you receive an error related to locale
, please execute:
if ! grep -q '^en_US.UTF-8' /etc/locale.gen; then
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen
locale-gen
echo 'LANG="en_US.UTF-8"' >> /etc/default/locale
source /etc/default/locale
fi
# Install ansible and git locally
$ apt install -y git python3-pip
$ python3 -m pip install --upgrade pip setuptools wheel
$ python3 -m pip install 'ansible<=9.0.0'
Note: In the Debian 11
environment, if systemd.unified_cgroup_hierarchy=0 is not found in /proc/cmdline
, ocboot will automatically configure the relevant GRUB options, rebuild the startup parameters, and restart the operating system so that k8s
can be launched normally.
# Install ansible and git locally
$ yum install -y git python3-pip
$ python3 -m pip install --upgrade pip setuptools wheel
$ python3 -m pip install 'ansible<=9.0.0'
# Install ansible locally
$ python3 -m pip install --upgrade pip setuptools wheel
$ python3 -m pip install 'ansible<=9.0.0'
Install Cloudpods
The deployment tool is available at https://github.com/yunionio/ocboot. You need to clone the tool using git clone
and then run the run.py
script to deploy the service. The following is the operation steps:
# Use git clone the ocboot deployment tool locally
$ git clone -b release/3.10 https://github.com/yunionio/ocboot && cd ./ocboot
Next, execute the run.py
script to deploy the service. The host_ip parameter is the IP address of the deployment node, which is optional. If not specified, the service will be deployed using the default route. If your node has multiple network cards, you can specify host_ip to select the corresponding network card to listen to the service.
- Mainland China
- Other Regions
# Directly deploy and pull the container image from registry.cn-beijing.aliyuncs.com
$ ./run.py cmp <host_ip>
# If there is a problem with slow pip installation package download,
# you can use the -m parameter to specify the pip source
# For example, use https://mirrors.aliyun.com/pypi/simple/ source below.
$ ./run.py -m https://mirrors.aliyun.com/pypi/simple/ cmp <host_ip>
For some network environments, if registry.cn-beijing.aliyuncs.com is slow or unreachable, you can specify the image source: docker.io/yunion to install, with the following command:
IMAGE_REPOSITORY=docker.io/yunion ./run.py cmp <host_ip>
The ./run.py
script will call the ansible to deploy the service. If the deployment process encounters problems that cause the script to exit, you can repeat the script to retry.
If you are deploying based on the CentOS 7 distribution, there will be one restart caused by the kernel. The ./run.py script will be interrupted. Please wait for the operating system to restart, then execute the ./run.py script again to perform the subsequent steps.
Deployment Complete
....
# After completing the deployment, the following output will be displayed, indicating a successful run
# Open https://10.168.26.216 in the browser, where the ip is set to <host_ip>
# You can access the front-end interface by logging in with admin/admin@123
Initialized successfully!
Web page: https://10.168.26.216
User: admin
Password: admin@123
Then use a browser to access https://10.168.26.216. Enter admin
for username and admin@123
for password to enter the Cloudpods interface.
Change the api_server access url
The api_server
option is the address of the access point for the entire platform, which affects the front-end CloudShell, vnc or Web SSH connection. It is generally impossible to open CloudShell or login the virtual machine through the front-end SSH when the api_server configuration has not been set correctly.
You need to modify it manually according to your environment, refer to the document: Change service api_server configuration.
Start using Cloudpods
Import public cloud or other private cloud platform resources
Cloudpods can unify and manage resources from other cloud platforms.
In the Multi-Cloud Management
menu, select Cloud Accounts
and create a new one. Fill in the authentication information for the corresponding cloud platform according to your needs. After configuring the cloud account, the Cloudpods service will synchronize the corresponding cloud platform resources. Once the synchronization is complete, you can view them in the front-end.
FAQ
1. How to reinstall?
Follow the steps below to reinstall:
-
Execute
kubeadm reset -f
to delete the Kubernetes cluster. -
Run the
run.py
script of ocboot again.
2. When creating a cloud account, there is no desired cloud platform to manage?
Please refer to feature-config ............... TODO
3. Other questions?
Other questions are welcome to be submitted on the Cloudpods github issues page: https://github.com/yunionio/cloudpods/issues, we will reply as soon as possible.