-
Notifications
You must be signed in to change notification settings - Fork 0
(A) Basic PhotonOS Patterns
Prerequisites:
- Pattern A-00
- Upload the 4.4.3 ovftool Linux x64 bit bundle to the
/usr/local/drop
repo of the master controller. See the following VMware Downloads page: https://customerconnect.vmware.com/downloads/get-download?downloadGroup=OVFTOOL443.
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:
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:
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
Prerequisites:
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:
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
Prerequisites:
- Pattern A-01
- Download PhotonOS OVA from here.
- Upload the OVA to
/usr/local/drop
on the Master Controller.
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: deploy PhotonOS by running the following script
python3 build-e2ep-photon-with-ovftool.py VMNAME
Example:
python3 build-e2ep-photon-with-ovftool.py photonos-test-01
Prereqisites:
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: get IP address by running the following script
python3 build-e2ep-get-vm-ip.py VMNAME
Example:
python3 build-e2ep-get-vm-ip.py photonos-test-01
The IP Address for the provided virtual machine will appear in the _photonos.log
.
Prereqisites:
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: change the default password by running the following script
python3 build-e2ep-change-default-photonos-pw.py VMNAME NEWPASSWORD
Example:
python3 build-e2ep-change-default-photonos-pw.py photonos-test-01 VMware1VMware1
Prerequisites:
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: change IP address by running the following script
python3 build-e2ep-change-photon-ip-address.py VMNAME IPADDRESS NETMASK DEFAULTGW
Example:
python3 build-e2ep-change-photon-ip-address.py photonos-test-01 172.16.0.85 255.255.255.0 172.16.0.1
Prerequisites:
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: run command locally using the following script
python3 build-e2ep-run-cmd-over-ssh.py "COMMAND" IPADDRESS USERNAME PASSWORD
Example:
python3 build-e2ep-run-cmd-over-ssh.py "mkdir /usr/local/TEST" 172.16.0.85 root VMware1VMware1
Prerequisites:
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: run command locally using the following script
python3 build-e2ep-download-file-over-ssh.py IPADDRESS USERNAME PASSWORD DOWNLOAD_URL TARGET_FILEPATH TARGET_FILENAME
Example:
python3 build-e2ep-download-file-over-ssh.py 172.16.0.85 root VMware1VMware1 https://raw.githubusercontent.com/boconnor2017/e2e-patterns/main/prep-photon.sh /usr/local/ test.sh
Prerequisites:
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: run remote script using the following script
python3 build-e2ep-run-file-over-ssh.py IPADDRESS USERNAME PASSWORD ENTRYPOINT SHSCRIPT
Example:
python3 build-e2ep-run-file-over-ssh.py 172.16.0.85 root VMware1VMware1 /usr/local/ test.sh
Prerequisites:
Step 1: using the master controller, navigate to the /usr/local/e2e-patterns/photon
repo:
cd /usr/local/e2e-patterns/photon
Step 2: build node controller using the following script
python3 build-e2ep-node-controller.py VMNAME
Example:
python3 build-e2ep-node-controller.py node-test-01