This repo provides a playground for PikaCloud. Setting up a physical cluster can be time-consuming and expensive, so we use Vagrant to create a virtual cluster. This allows us to develop PikaCloud without needing to invest in hardware.
Warning: Never use this in production. This is only for development and testing purposes. THIS IS NOT SECURE.
The virtual cluster consists of 5 VMs:
mgt: The management node. It runs the management software, such as storage management, network managementserver: The server node. It runs the supporting services, such as Ceph storage cluster, ETCd cluster and PostgreSQL cluster.client: The client node. It runs the compute services, such as the VM Engine and the Container engine.
Note that the physical cluster layout is different from the virtual cluster layout. This layout is designed for the development and testing purpose.
Install Vagrant and VirtualBox.
The VMs will be install in ~/VirtualBox VMs by default. If you want to change the location, you can run the following command:
VBoxManage setproperty machinefolder /path/to/your/vm/folderWe assume you use virtualbox as the provider. If you use libvirt or other providers, you need to change the Vagrantfile to use libvirt as the provider and modify the provider-specific settings, such as the network configuration and the amount of memory. The platform is tested on Linux with newer versions of Vagrant and VirtualBox. No Windows support is planned.
We'll also need some plugins for Vagrant. Install the following:
vagrant plugin install vagrant-cachier
vagrant plugin install vagrant-hostmanagerSince the admin machine will need the Vagrant SSH key to log into the server machines, we need to add it to our local SSH agent:
On Mac:
ssh-add -K ~/.vagrant.d/insecure_private_keyOn *nix:
ssh-add -k ~/.vagrant.d/insecure_private_keyRun the following command, if no error occurs, the VMs will be started. It will take a few minutes to download the base box and start the VMs.
bash pre-install.sh # Only run once!
vagrant upThe cluster will be automatically deployed in the provisioning process. You can check the status of the cluster by running the following command:
ceph -sIf you are interested in the details of deployment, you can check the deploy-ceph-*.sh script.
TBD. Now only a single PostgreSQL instance is deployed on mgt node.
TBD. Now only a single ETCD instance is deployed on mgt node.
TBD. Now only the basic environment is deployed.
The necessary information such as Database password is listed in the cluster-shared/installation-report.txt file.
You must run
bash post-install.sh
to complete the installation.
- Deploy PostgreSQL cluster
- Deploy ETCD cluster
- Deploy PikaCloud
If you see this error, you need to start the SSH agent. If it doesn't work, you'd better use bash instead of zsh or fish.
eval `ssh-agent`mkdir -p /tmp/vagrant-cache/yumfailed: This is a known issue with thevagrant-cachierplugin. It can be safely ignored. Just runvagrant haltandvagrant upto continue.