-
Notifications
You must be signed in to change notification settings - Fork 0
(A) Basic PhotonOS Patterns
- Prerequisites: This lab uses Docker to run ovftool as a container. Prior to running the script below, please upload the 4.4.3 ovftool Linux x64 bit bundle to the Master Controller at
/usr/local/drop
. See the following VMware Downloads page: https://customerconnect.vmware.com/downloads/get-download?downloadGroup=OVFTOOL443. - Description: build ovftool into a container.
- Expected runtime: 1-2min
Step 1: using the master controller, navigate to the drop repo.
cd /usr/local/drop
Step 2: Verify the VMware-ovftool-4.4.3-18663434-lin.x86_64 bundle has been downloaded.
ls
Should return:
root@photon-machine [ /usr/local/drop ]# ls
VMware-ovftool-4.4.3-18663434-lin.x86_64.bundle
Step 3: build the ovftool container
cd /usr/local/e2e-patterns/photon/
sh build-e2e-pattern-ovftool.sh
Use the following syntax to test or run the ovftool
docker run ovftool --rm -it -v $PWD --help
- Prerequisites: None.
- Description: build powercli container.
- Expected runtime: 1-2min
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo.
cd /usr/local/e2e-patterns/photon
Step 2: build the powercli container.
sh build-e2e-pattern-pcli.sh
To run the PowerCLI container interactively, run the following:
docker run --rm -it vmware/powerclicore
To run a PowerShell script, run the following (replace sample.ps1 with appropriate script name):
docker run --rm --entrypoint="/usr/bin/pwsh" -v ${PWD}:/tmp vmware/powerclicore /tmp/sample.ps1
NOTE: all PowerShell scripts need to begin with #!/bin/sh
otherwise you will receive exec format error
from Docker. For example: sample.ps1
#!/bin/sh
echo "Hello World!"
- Prerequisites: None.
- Description: build Terraform container.
- Expected runtime: 1-2min
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo.
cd /usr/local/e2e-patterns/photon
Step 2: build the terraform container.
sh build-e2ep-terraform.sh
To run the Terraform container interactively, run the following:
docker run -i -t hashicorp/terraform --help
Create main.tf
file in a dedicated directory on the Photon appliance and use the following syntax to initialize:
docker run -v $(pwd):$(pwd) -w $(pwd) -i -t hashicorp/terraform init
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/minikube
repo.
cd /usr/local/e2e-patterns/minikube
Step 2: build the minikube pattern on the Master Controller (small scale) using the -p
parameter.
python3 build-e2ep-k8.py -p
Or build the minikube pattern on its own Photon Controller using the -a
parameter.
python3 build-e2ep-k8.py -a
Step 3: validate kubectl
kubectl --help
- Prerequisites: None.
- Description: builds an Ansible container.
- Expected runtime: 1-2min
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo.
cd /usr/local/e2e-patterns/photon
Step 2: build the ansible container.
sh build-e2ep-ansible.sh
To run the ansible container interactively, run the following:
docker run -i -t alpinelinux/ansible ansible --help
Warning This Pattern is actively being developed.
- Prerequisites: Download PhotonOS ISO from here. Upload the ISO to the local ESXI datastore.
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: build the template by running the following script
python3 build-e2ep-photon-template.py
The script will pause when it is ready for you to mount the ISO to the virtual machine. Follow the instructions posted to the CLI.
Warning This Pattern is actively being developed.
Warning This Pattern is actively being developed.
- Prerequisites: Prerequisites: Pattern A-01 & Pattern A-02
- Description: deploy a PhotonOS appliance to the ESXi host and run the prep script.
- Expected runtime: 7-10min
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: deploy the photon controller using the following inputs:
- VM Name (as it will appear in vCenter)
python3 build-e2ep-photon-controller.py e2ep-photontest-02