In continuation of my last post on Kubernetes as a service on vCloud Director , here is the next post on installation of Container Server Extension on vCloud Director.
This post applies to CSE version 1.2.5
CSE Installation
This installation procedure applies to Client VM as well as CSE Server VM. For this installation i will leverage a Photon OS 2.0 VM based on the official OVA which is available here. deploy OVA following the standard OVA deployment procedure.Once deployed, make sure you configure static IP and configure networking correctly based on your environment and ensure that this machine can reach to internet to download necessary binaries.
Configure Static IP on Photon OS
Edit file 99-dhcp-en.network inside directory /etc/systemd/network and change as below.
By default ping is disabled on this , so open firewall using below commands:
Now Install Python related binaries using below command:
root@photon-machine [ ~ ]# tdnf install -y build-essential python3-setuptools python3-tools python3-pip python3-devel
root@photon-machine [ ~ ]# pip3 install –upgrade pip (double dash –)
Install CSE Software:
Now install and verify the installation CSE:
root@photon-machine [ ~ ]# pip3 install container-service-extension
This completes installation of CSE , now we need to enable CSE client on this VM.
Enable CSE Client:
Go and edit ~/.vcd-cli/profiles.yaml
file to include this section: (exactly like in Image)
vCD Prerequisites:
There are many important requirements that must be fulfilled to install CSE successfully on vCD.
- Catalog Organization creation:
- Create a VDC within the org that has an external org network in which vApps may be instantiated and sufficient storage to create vApps and publish them as templates. The external network connection is required to enable template VMs to download packages during configuration. The process as follows:
- CSE server will upload base OS image to vCloud Director in a CSE Catalog
- CSE server will deploy the template as a VM on a Org VDC Network that requires internet access and will download and install required kubernetes and docker binaries.
- CSE will then validate the VM and capture as vApp template and add it back to the CSE Catalog as a valid item for deploying container hosts.
- Create a user in the org with privileges necessary to perform operations like configuring AMQP, creating public catalog entries, and managing vApps.
- A good network connection from the host running CSE installation to vCD as well as the Internet. This avoids intermittent failures in OVA upload/download operations.
CSE Server Config File:
The CSE server is controlled by a yaml configuration file that must be filled out prior to installation. Once vCD pre-requisites are ready, You can generate a sample file using below command:
#cse sample > config.yaml ( cse sample generates sample config yaml)
Run above command on above VM which we have prepared for our CSE server , This file is having five sections , which i am going to cover one by one.
AMQP Section:
- During CSE Server installation, CSE will configure AMQP to ensure communication between vCD and the running CSE server. if vCD has already been configured then skip this section while running install command , if vCD has not been configured with AMQP configuration then enter information in this section which will automatically go and configure this for you in vCD. Configure this section as described below:
vCD Section:
- This section is self explanatory , you need to specify vCD related details (ensure API version is related to vCD version):
vCS Section:
- In this section provide vCenter information like VC name and credential.
Service Section:
- The service section specifies the number of threads to run in the CSE server process.
Broker Section:
- The broker section contains properties to define resources used by the CSE server including org and VDC as well as template definitions. The following Image summarise key parameters. More Details can be found here
- Sample Config.yaml file can be downloaded from config.
CSE SERVER INSTALLATION:
- Once your are ready with file run CSE install command to start the installation. ( as said earlier we need to create a VM on which CSE server must be installed by the vCloud Director System/Cloud Administrator.The CSE appliance must be reachable to vCenter , vCD and AMQP servers. i am installing on the VM which i have prepared in first section)
- #cse install -c config.yaml –ssh-key=$HOME/.ssh/id_rsa.pub –ext config -amqp skip
- I am skipping amqp configuration as “AMQP” is already configured in my vCD.
- it failed due to some issue , so i have to rerun the command after fixing the issue and same can be done multiple times.
- Once installation is completed , check the installation status using:
- #cse check –config config.yaml –check-install
- Now to validate that CSE has been registered in vCD Use “vcd-cli” command line, check that the extension has been registered in vCD:
Running CSE Server as a Service:
- create a file named “cse.sh” inside directory /home/vmware with following content:
- create file name cse.service inside directory /etc/systemd/system with following content:
- Once installed you can start the CSE service daemon using #systemctl start cse . To enable, disable, and stop the CSE service, use CSE client.
Setting the API Extension Timeout
-
The API extension timeout is the number of seconds that vCD waits for a response from the CSE server extension. The default value is 10 seconds, which may be too short for some environments. To change the time follow the steps :
-
On the vCloud Director cell run:
- Go to Cd /opt/vmware/vcloud-director/bin and run below commands -l to list -v to Set.
-
Enable CSE
- Login to vCD and enable the CSE using below commands…
This completes the installation of Container Server Extension and allow providers to offer Kubernetes as a Service to their customers. feel free to share your experience on this installation.
Pingback: VMware Container Service Extension Upgrade – VMTECHIE
Hello, after installing CSE software (pip3 install container-service-extension) I have the following error:
vcd.log:
“Warning: the profiles file’~/.vcd-cli/profiles.yaml’ could not be open. Using default values”
I didn’t find any reference about this message
Any suggestion?
Thanks in advance.
LikeLike
looks like the user account does not have permission..get in to sudo and then install..
LikeLike