Installation
Installation
To begin the installation of PEC, run the install.sh command.
The install.sh command requires root level permission to run, however, a user with sudo level permissions' status can also run these commands.
The files are installed under the /opt/pf9/airctl folder. See the Artifacts page for more details on the directory structure.
Configuration file
The directory /opt/pf9/airctl/conf is the directory that contains an example configuration file. Users should copy the configuration file into their home directory. By default, airctl looks for the presence of the $HOME/airctl-config.yaml file. Airctl also provides the option --config to pass the configuration file’s location if it is not present in the default location. Now that we are ready to configure the software, begin by creating a config file.
Next, edit the new config file with your specific settings using the editor of your choice. See the Airctl Reference page for more details on all the config file parameters. We recommend verifying the default value of the following options:
- duFqdn
- vmCpus, vmMemoryMb,
- dockerRepo: points to the offline bundle for docker example /opt/pf9/airctl/docker-v-5.3.0-1675863.tar.gz
If implementing an air gapped system with local registries, please review the Using a Local Docker Registry on Air-Gapped Systems article before proceeding.
Initialization
This initialization step installs docker and registers the containers that are used by the DU/Management plane. Additionally, it creates a DNS entry based on the configuration file info for the DU DNS name on the local machine.
Next, verify that docker is working for the current user. Make sure the current user can access docker CLI.
You will now need to log out and then log back in after this step.
Starting the Management Plane
Use the command below to initiate the management plane.
Obtain Credentials
Now we acquire the credential of the newly created DU.
Note: Please update the duUser and the duPassword entries in the config file with the above values before proceeding. If the default admin password is unchanged, then the duPassword field is optional.
Accessing the UI/CLI
Accessing the UI or CLI is not possible using the IP address. You will either need to update your DNS settings to create an A record or have the FQDN and IP of the physical host's DU (management station) where the management plane runs. For testing purposes, you can create an /etc/hosts entry on your local workstation.
Configure Hosts
This section discusses how to prepare multiple hosts to be added to the cluster when you have direct SSH access. Your Platform9 solutions architect can assist you in working through methods of onboarding hosts. At this point, we are ready to onboard new hosts.
There are multiple methods to onboard hosts, especially if you do not have direct SSH access. The airctl
command has a call named configure-hosts which aids in configuring multiple hosts and prepares them, along with the Platform9 agent that is already running and ready to add to a cluster. The command also helps set up the /etc/hosts entry to point to the Platform9 DU, and can optionally install docker. Additionally, it has the ability to pre-cache docker images as needed. The airctl page can reference more completed details on these tasks. The airctl command uses the nodeHostnames option to specify which hosts should be processed.
nodeHostnames
10.128.147.73
10.128.147.185
test-pf9-airgap-c7-1676888-610-1.novalocal
/opt/pf9/airctl/airctl configure-hosts --help
configure the hosts for agent installation, docker installation and image pre-install
•
Usage:
airctl configure-hosts [flags]
•
Flags:
-h, --help help for configure-hosts
--reset-pf9-managed-docker-conf remove PF9_MANAGED_DOCKER=false from /etc/pf9/kube_override.env, this would enable PMK to completely manage(install, upgrade) docker as part of the cluster creation
--skip-docker-img-import skip import the docker images on each hosts
--skip-docker-install skip docker install on each hosts
--skip-image-renaming skip image renaming to point to the privateRegistryBase, for e.g. gcr.io/hyperkube will become <privateRegistryBase>/hyperkube
--skip-yum-repo-install skip yum repo installation, default to false
•
Global Flags:
--config string config file (default is $HOME/airctl-config.yaml)
--json json output for commands (configure-hosts only currently)
--verbose print verbose logs to the console
Behind the scene, configure-host is going to accomplish the following:
- Create a Yum-Repo (unless --skip-yum-repo-install) is specified to install Platform9 agents
- Install docker (unless --skip-docker-install) is specified
- Push all the images needed by Platform9 (unless --skip-image-import is specified)
As mentioned earlier, the newer version moves to a central registry and needs you to have up to date yum-repos, in which case some --skip-xxx can be applied, and the process would be much faster.