ansible role integration test #35
Open
opened 2023-06-12 00:59:54 +00:00 by jon_nfc
·
15 comments
No Branch/Tag Specified
Labels
Clear labels
Bug
Used in discussion about a bug in comments or commits
CVE-2023-5764
Denotes items related to the CVE
CodeReview
Used in comments (issues/MR/commits) to denote code review related items
Documentation
Documentation items
Feature
Used in discussion about a Feature in comments or commits
Lint
Used in comments (issues/MR/commits) to denote lint tasks todo, done, fixed
Privacy
Used in comments (issues/MR/commits) to denote privacy related items
Security
Used in comments (issues/MR/commits) to denote Security related items
breaking-change
label used to denote that the issue/Merge Request does/will introduce a breaking change
bug::reproducable
Given to an issue when the bug has been confirmed as re-producable. Can also be used in comments and commits.
bug::unable to reproduce
Given to an issue when the bug that is not able to be reproduced. Can also be used in comments and commits.
code review::complete
code review::not started
code review::rejected
code review::underway
difficulty::Full Development
Level 3. Difficulty representing that the task to complete must be planned and created.
difficulty::Good First Issue
Level 1. Difficulty representing that the task is very simple and with limited knowledge can be completed.
difficulty::Prior Knowledge
Level 2. Difficulty representing that the task requires some prior knowledge of either the technology or the project for task completion.
documentation::complete
Issues, Merge Requests
documentation::no change required
Issues, Merge Requests and used to denote no documentation changes required
documentation::not started
Issues, Merge Requests
documentation::stalled
Issues, Merge Requests
documentation::underway
Issues, Merge Requests
impact::0
impact::1
impact::2
impact::3
impact::4
impact::5
ops::ansible-roles
OPS project tag
ops::automation
ops::gitlab-ci
OPS project tag
ops::marcas
OPS project tag
ops::python-gitlab-management
OPS project tag
ops::website
priority::0
priority::1
priority::2
priority::3
priority::4
priority::5
stage::Ready for Development
stage::develop
Stage for use in Issues and Merge Requests. Can also be used in discussion in comments and commits
stage::feedback required
stage::planning
Stage for use in Issues and Merge Requests. Can also be used in discussion in comments and commits
stage::test
Stage for use in Issues and Merge Requests. Can also be used in discussion in comments and commits
stale
Label given to issues/merge requests that are considered stale due to no collaboration and is a mark for closure.
triage
Tag given to issues/merge requests requiring triaging by the team.
triage::not_confidential
This tag is given by the triage bot so that URLs can be added to an issue/comment. A triage policy for NFC wide should remove this label.
type::CI / CD
type::automation
This type is used to denote an automation job
type::bug
Type for Issues and Merge Requests. Can also be used in discussion in comments and commits
type::compliance
type::discussion
Type for Issues. Can also be used in discussion in comments.
type::documentation
Type for Issues and Merge Requests. Can also be used in discussion in comments and commits
type::feature
type for Issues and Merge Requests. Can also be used in discussion in comments and commits
type::invalid
label given to tickets that require no action or are deem as invalid.
type::quality assurance
Type for Issues and Merge Requests. Can also be used in discussion in comments and commits
type::question
Type for Issues. Can also be used in discussion in comments.
type::security
Type for Issues and Merge Requests.
type::specification
Design specification
workflow::complete
Issues, Merge Requests
workflow::not ready
workflow::not ready::blocked
workflow::not started
Issues, Merge Requests
workflow::ready to commence
Issues, Merge Requests
workflow::stalled
Label given to issues/merge requests where no work has occured in x days iaw triage policy.
workflow::underway
Issues, Merge Requests
workflow::underway::develop
Area/CI-CD
Documentation changes
Area/Documentation
Documentation changes
Area/Security
This is security issue
Area/Testing
Issue or pull request related to testing
Bug
Failure to Confirm
Bug exists due to not confirming/testing code
Bug
Regression
THe bug is a regression of a feature
Bug
To be Confirmed
This bug is not confirmed
Bug
Unable to Reproduce
A developer can not re-create/re-produce the bug
Compat/Breaking
Breaking change that won't be backward compatible
Impact
Critical
1
The impact is critical in that it is blocking or prevents usage.
Impact
High
2
The impact requires that changes be made for continuted usage.
Impact
Low
4
The impact requires the user approach from a different angle for continued usage.
Impact
Medium
3
The impact requires a workaround for continued usage.
Impact
Very Low
5
The impact has a slight effect on usage.
Priority
High
2
The priority is high
Priority
Low
4
The priority is low
Priority
Medium
3
The priority is medium
Priority
Very High
1
The priority is critical
Priority
Very Low
5
The priority is very low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Type
Bug
Something is not working
Type
Epic
Epic User Story
Type
Feature
Feature / Module
Type
Incident
Something occured related to a service
Type
RFE
Request for Enhancement
Type
Task
A work item that must be done
Urgency
Low
4
Prioritize this amoungst your list of things to do.
Urgency
Major
1
Urgency is so high it should have been dealt with last week.
Urgency
Medium
3
Start as soon as possible.
Urgency
Very High
2
Urgency is high enough to warrant near immediate commencement.
Urgency
Very Low
5
Add this to your list of things to do.
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/gitlab-ci#35
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
develop integration tests for ansible roles that essentially are a docker container that replicate a fresh install of the operating system in question. by spinning up this container, the ansible role as part of the integration test would deploy the role to that container and confirm it ran as intended.
🚧 Tasks
proposal for debian
In this Dockerfile, the specific Debian version "11.0" is used, indicating both the major and minor versions. Adjust the version number according to your requirements.
Build the Docker image using the updated Dockerfile:
Then, start a container with the desired services using:
This will create a container named
debian-container
with only the default services installed on a fresh Debian 11.0 installation.proposal for ubuntu
Dockerfile for Ubuntu 20.04:
Command to build and run the Docker container from the image for Ubuntu 20.04:
Dockerfile for Ubuntu 18.04:
Command to build and run the Docker container from the image for Ubuntu 18.04:
In the
docker run
commands, the additional argument--privileged
is added to the command to give the container extended privileges, which may be necessary for certain functionality or specific use cases.added 20m of time spent
with docker for dind
To include Docker inside the Docker container for Docker-in-Docker (DinD) functionality, you can modify the Dockerfile as follows:
In this modified Dockerfile, the installation of Docker is added to enable Docker-in-Docker functionality. The necessary packages and dependencies are installed, and the official Docker repository is added to the package sources. The Docker CE CLI (command-line interface) is then installed.
Build the Docker image using the updated Dockerfile:
Then, start a container with the desired services, including Docker, using:
This will create a container named
debian-dind-container
with the default services installed on a fresh Debian 11.0 installation, including Docker for Docker-in-Docker functionality. Note the use of the--privileged
flag to give the container necessary privileges to run Docker inside.inclusive of docker for dind
adjusted Dockerfiles for Ubuntu 20.04 and Ubuntu 18.04, including the installation of Docker for Docker-in-Docker (DinD) functionality:
Dockerfile for Ubuntu 20.04:
Command to build and run the Docker container from the image for Ubuntu 20.04 with Docker-in-Docker support:
Dockerfile for Ubuntu 18.04:
Command to build and run the Docker container from the image for Ubuntu 18.04 with Docker-in-Docker support:
added 10m of time spent
getting systemd to work
an updated version of the Dockerfile that incorporates systemd:
This updated Dockerfile installs systemd and configures it as the init system. It also installs the other packages you specified and includes the configuration for the SSH server.
Please note that running systemd inside a Docker container can have limitations and may not work as expected in all scenarios. Ensure that you have a valid use case for using systemd in a containerized environment.
To build the Docker image with systemd support, use the following command:
The
--cap-add=SYS_ADMIN
flag grants the container the necessary capabilities, and the--tmpfs
flags create temporary filesystems required by systemd. The--security-opt seccomp=unconfined
flag disables seccomp filtering, which can sometimes interfere with systemd.Please note that running systemd inside a container is an advanced configuration and may have security and operational implications. It's recommended to explore alternative approaches that align better with containerization principles whenever possible.
marked this issue as related to nofusscomputing/infrastructure/config#12
marked this issue as related to nofusscomputing/projects/ansible/ansible-roles#13
mentioned in merge request nofusscomputing/projects/ansible/ansible_docker_os!1
mentioned in commit nofusscomputing/projects/ansible/ansible_docker_os@2bf2856f44153dfeb7d9f5b7c92e116ec9aa0f64
mentioned in commit nofusscomputing/projects/ansible/ansible_docker_os@48731b6de5969b4ede389d5b62dd693d4b39faa8
mentioned in merge request nofusscomputing/projects/ansible/ansible_docker_os!3
mentioned in commit nofusscomputing/projects/ansible/ansible_docker_os@6f5b8911c0d621fb98495b300e453cea25ea72f1
mentioned in commit nofusscomputing/projects/ansible/ansible_docker_os@8ba5052f3a0c570761253ffb14d199ddfd16a70b