Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker image for v3.1 #542

Merged
merged 3 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ This project supports below scenarios for end-to-end guest operating system vali
This compatible guest operating systems list is used for this project only. For guest operating system support status on ESXi, please refer to [VMware Compatibility Guide](https://www.vmware.com/resources/compatibility/search.php?deviceCategory=software&testConfig=16).

### Docker images
* Latest (Release v3.0):
* Latest (Release v3.1):
* projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
* Release v3.0:
* projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:v3.0
* Release v3.1:
* projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:v3.1

Launch testing using Docker image
1. Execute below commands in your machine
Expand Down
19 changes: 9 additions & 10 deletions docker_file/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ansible-vsphere-gos-validation
# For users launch guest OS validation test on vSphere
# version: 3.0
# version: 3.1

# Use latest Photon OS 4.0 docker image as parent image
FROM photon:4.0
# Use latest Photon OS docker image as parent image
FROM photon:latest
WORKDIR /root/ansible-vsphere-gos-validation

# Install the required packages
Expand All @@ -13,8 +13,8 @@ RUN tdnf makecache && \
python3-wheel python3-jmespath python3-netaddr && \
pip3 install pycdlib pywinrm pyvmomi pypsrp passlib

# Install ansible-core (starts from Ansible 2.11)
RUN pip3 install ansible-core
# Install ansible-core
RUN pip3 install ansible-core==2.15.8

# Install Ansible collections
# You can set https proxy if collections are failed to install from Galaxy server, e.g.,
Expand All @@ -24,13 +24,12 @@ ENV LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
RUN ansible-galaxy collection install ansible.netcommon ansible.posix community.general community.vmware community.windows community.crypto

# Download latest 'ansible-vsphere-gos-validation' release to working dir
RUN curl -s https://api.github.com/repos/vmware/ansible-vsphere-gos-validation/releases/latest | grep "tarball_url" | cut -d "\"" -f 4 | xargs -n 1 wget -O test.tar.gz && \
tar -zxf test.tar.gz && \
mv vmware-ansible-vsphere-gos-validation*/* ./
RUN wget --no-check-certificate https://github.com/vmware/ansible-vsphere-gos-validation/archive/refs/heads/main.tar.gz -O /tmp/test.tar.gz && \
tar -zxf /tmp/test.tar.gz -C /tmp && \
mv /tmp/ansible-vsphere-gos-validation-main/* ./

# Clean up unused files
RUN rm -rf test.tar.gz vmware-ansible-vsphere-gos-validation* && \
tdnf clean all && \
RUN tdnf clean all && \
rm -rf /var/cache/* /root/.cache/pip/* /var/log/* /tmp/* /root/.ansible/tmp/*

# Known issue: ping: socket SOCK_DGRAM 1: Permission denied, Kernel bug workaround
Expand Down
16 changes: 16 additions & 0 deletions docker_file/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# How to update docker image
## Build docker image
Build a new docker image with version tag vX.Y for latest release.
```
docker build . -t ansible-vsphere-gos-validation:vX.Y
```

## Run docker container to test the new docker image
```
docker run -it --privileged ansible-vsphere-gos-validation:vX.Y
```

## Tag the docker image as latest
```
docker image tag ansible-vsphere-gos-validation:vX.Y ansible-vsphere-gos-validation:latest
```
50 changes: 0 additions & 50 deletions docs/KNOWN_ISSUES.md

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ pyvmomi
passlib
pytesseract
Pillow
ansible-core
ansible-core==2.15.8