Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
b76772d955 | |||
aa8804f887 | |||
b0f236d935 | |||
5484d6315a | |||
fb7db64235 | |||
3e7094c243 | |||
3f6e77b0ed | |||
0a367146bf | |||
42d2cb79df | |||
53e445d155 | |||
e1ffb03ce4 | |||
cd82c7c3d7 | |||
f944a3c6ee | |||
f43f265c7f | |||
ea1c9ec676 | |||
669689e8df | |||
96b9cf0bbb | |||
e6ce3f9581 | |||
2cbc4e11d9 | |||
1c517d4157 |
7
.cz.yaml
Normal file
7
.cz.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
commitizen:
|
||||
bump_message: "build(version): bump version $current_version \u2192 $new_version"
|
||||
changelog_incremental: false
|
||||
name: cz_conventional_commits
|
||||
tag_format: $major.$minor.$patch$prerelease
|
||||
update_changelog_on_bump: true
|
||||
version: 0.1.0
|
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
.gitlab-ci.yml
|
||||
README.md
|
59
.gitlab-ci.yml
Normal file
59
.gitlab-ci.yml
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
MY_PROJECT_ID: "45741845"
|
||||
GIT_SYNC_URL: "https://$GITHUB_USERNAME_ROBOT:$GITHUB_TOKEN_ROBOT@github.com/NoFussComputing/execution_environment.git"
|
||||
|
||||
DOCKER_IMAGE_BUILD_TARGET_PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7"
|
||||
DOCKER_IMAGE_PUBLISH_NAME: 'ansible-ee'
|
||||
DOCKER_IMAGE_PUBLISH_REGISTRY: docker.io/nofusscomputing
|
||||
DOCKER_IMAGE_PUBLISH_URL: https://hub.docker.com/r/nofusscomputing/$DOCKER_IMAGE_PUBLISH_NAME
|
||||
|
||||
|
||||
|
||||
include:
|
||||
- project: nofusscomputing/projects/gitlab-ci
|
||||
ref: development
|
||||
file:
|
||||
- .gitlab-ci_common.yaml
|
||||
- type/docker-image.gitlab-ci.yaml
|
||||
#- template: Jobs/Container-Scanning.gitlab-ci.yml # see https://gitlab.com/gitlab-org/gitlab/-/issues/381665
|
||||
|
||||
|
||||
|
||||
Build/Cache Python Packages:
|
||||
stage: build
|
||||
image: nofusscomputing/docker-buildx-qemu:dev
|
||||
services:
|
||||
- name: docker:23-dind
|
||||
entrypoint: ["env", "-u", "DOCKER_HOST"]
|
||||
command: ["dockerd-entrypoint.sh"]
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2375/
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
before_script:
|
||||
- docker info
|
||||
#- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- pip3 install setuptools wheel
|
||||
- pip3 install commitizen==2.21.0 # version specified so current build works.
|
||||
- pip3 install gitlab-ci/gitlab_release/python-module/cz_nfc/.
|
||||
- update-binfmts --enable # Important: Ensures execution of other binary formats is enabled in the kernel
|
||||
- docker buildx create --driver=docker-container --driver-opt image=moby/buildkit:v0.11.6 --use
|
||||
- docker buildx inspect --bootstrap
|
||||
script: |
|
||||
docker buildx build \
|
||||
--file dockerfile-build_cache \
|
||||
--platform=$DOCKER_IMAGE_BUILD_TARGET_PLATFORMS . \
|
||||
--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN \
|
||||
--build-arg CI_API_V4_URL=$CI_API_V4_URL \
|
||||
--build-arg CI_PROJECT_ID=$CI_PROJECT_ID
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
when: never
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
- if: '$CI_COMMIT_BRANCH != "master"'
|
||||
allow_failure: true
|
||||
when: manual
|
||||
- when: never
|
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
[submodule "gitlab-ci"]
|
||||
path = gitlab-ci
|
||||
url = https://gitlab.com/nofusscomputing/projects/gitlab-ci.git
|
||||
branch = development
|
29
CHANGELOG.md
Normal file
29
CHANGELOG.md
Normal file
@ -0,0 +1,29 @@
|
||||
## 0.1.0 (2023-05-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **ci**: [42d2cb79](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/42d2cb79dfc9d1ecbdab9945b327d819f00631fe) - syntax error [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
- **ci**: [53e445d1](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/53e445d15511bb7691acc273d2e0c90c02da30d8) - specify commitezen version [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
- **ci**: [e1ffb03c](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/e1ffb03ce4473b4ef8d56a56847fc27390df8bfd) - use specified dind imge [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
- **ci**: [cd82c7c3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/cd82c7c3d7a81a27f10c15ec3a6aaedbe2712894) - ensure submodules expanded [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
|
||||
### Continious Integration
|
||||
|
||||
- [b0f236d9](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/b0f236d93553f1301a8487092e0cb5105b7abccc) - update to current gitlab-ci project dev head [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
- **publish**: [0a367146](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/0a367146bfa5b409273c0412fca8f4d33287068d) - default to dev tag for image [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
- [f43f265c](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/f43f265c7f1691c58bcdf8bb4ec0a0bf8fb0be6f) - added initial ci jobs [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
- [e6ce3f95](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/e6ce3f9581a90f5ce4d11eaf16e89b6956ec39c9) - add dummy job [ [!1](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/1) ]
|
||||
- **github**: [1c517d41](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/1c517d41575b838e61561f03fcf1d118df163f55) - add github sync job [ [!1](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/1) ]
|
||||
|
||||
### Documentaton / Guides
|
||||
|
||||
- [fb7db642](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/fb7db64235133aac3ff02331b14ae8131f9da9bf) - todo [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
- **readme**: [669689e8](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/669689e8df76bc3d3225081db99918cbd4b51688) - Updated Repository README
|
||||
- **readme**: [2cbc4e11](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/2cbc4e11d9e4e935db54ae1e3e319b1e4d813299) - Updated Repository README
|
||||
|
||||
### Features
|
||||
|
||||
- **ci**: [3e7094c2](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/3e7094c243e8a22bf3443bf8db176a4f0b69776c) - use nfc gitlab-ci project for ci [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
- **python_build**: [3f6e77b0](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/commit/3f6e77b0ed651a1f0418ada7d8849b5f048880f1) - compile and cache pip packages [ [!3](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests/3) ]
|
||||
|
||||
## 0.0.1 (2023-05-05)
|
62
README.md
62
README.md
@ -1,3 +1,61 @@
|
||||
# execution environment Repository.
|
||||
<div align="center" width="100%">
|
||||
|
||||
This repository was created by ansible!!
|
||||
|
||||
|
||||
# No Fuss Computing - Execution Environment
|
||||
|
||||
<br>
|
||||
|
||||

|
||||
|
||||
<br>
|
||||
|
||||
  [](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/issues)
|
||||
|
||||
|
||||
|
||||
  
|
||||
<br>
|
||||
|
||||
This project is hosted on [gitlab](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment) and has a read-only copy hosted on [Github](https://github.com/NofussComputing/execution_environment).
|
||||
|
||||
----
|
||||
|
||||
**Stable Branch**
|
||||
|
||||
 
|
||||
|
||||
----
|
||||
|
||||
**Development Branch**
|
||||
|
||||
 
|
||||
|
||||
----
|
||||
<br>
|
||||
|
||||
</div>
|
||||
|
||||
links:
|
||||
|
||||
- [Issues](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/issues)
|
||||
|
||||
- [Merge Requests (Pull Requests)](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/merge_requests)
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
**TO DO:**
|
||||
|
||||
point docs to gitlab-ci for docker build
|
||||
|
||||
|
||||
## Contributing
|
||||
All contributions for this project must conducted from [Gitlab](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment).
|
||||
|
||||
For further details on contributing please refer to the [contribution guide](CONTRIBUTING.md).
|
||||
|
||||
|
||||
## Other
|
||||
|
||||
This repo is release under this [license](LICENSE)
|
||||
|
4
ansible.cfg
Normal file
4
ansible.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
[defaults]
|
||||
collections_path=/etc/ansible/collections
|
||||
roles_path=/etc/ansible/roles
|
||||
log_path=/ansible.log
|
82
dockerfile
Normal file
82
dockerfile
Normal file
@ -0,0 +1,82 @@
|
||||
FROM --platform=$BUILDPLATFORM python:3.11-bullseye as fetch-ansible-roles
|
||||
|
||||
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& dpkg-reconfigure debconf -f noninteractive
|
||||
|
||||
|
||||
RUN apt update \
|
||||
&& apt install --reinstall -yq \
|
||||
git || true
|
||||
|
||||
|
||||
RUN git clone -b development --depth 1 https://gitlab.com/nofusscomputing/projects/ansible-roles.git /tmp/ansible-roles
|
||||
|
||||
|
||||
|
||||
FROM --platform=$TARGETPLATFORM python:3.11-bullseye
|
||||
|
||||
# Ansible chucks a wobbler without. see: https://github.com/ansible/ansible/issues/78283
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
|
||||
COPY --from=fetch-ansible-roles /tmp/ansible-roles/roles /etc/ansible/roles
|
||||
|
||||
# Ref: https://github.com/opencontainers/image-spec/blob/d86384efdb8c30770a92415c100f57a9bffbb64e/annotations.md
|
||||
LABEL \
|
||||
# org.opencontainers.image.authors="{contributor url}" \
|
||||
org.opencontainers.image.vendor="No Fuss Computing" \
|
||||
# org.opencontainers.image.url="{dockerhub url}" \
|
||||
# org.opencontainers.image.documentation="{docs url}" \
|
||||
# org.opencontainers.image.source="{repo url}" \
|
||||
# org.opencontainers.image.revision="{git commit sha at time of build}" \
|
||||
org.opencontainers.image.title="No Fuss Computings Ansible Execution Environment" \
|
||||
org.opencontainers.image.description="An ansible execution environment for awx/tower and CI/CD pipelines" \
|
||||
org.opencontainers.image.vendor="No Fuss Computing"
|
||||
# org.opencontainers.image.version="{git tag}"
|
||||
|
||||
|
||||
|
||||
# This Black Magic exists as libc-bin was being a turd and returning errors when trying to install git, ssh.
|
||||
# see: https://askubuntu.com/questions/1339558/cant-build-dockerfile-for-arm64-due-to-libc-bin-segmentation-fault
|
||||
# see: https://github.com/dcycle/prepare-docker-buildx/blob/09057fe4879e31ee780b9e69b87f41327ca8cd8e/example/Dockerfile#L8-L10
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt update \
|
||||
&& apt --fix-broken install \
|
||||
&& apt install -y libc-bin locales-all \
|
||||
&& apt update \
|
||||
&& apt install --reinstall --no-install-recommends -yq \
|
||||
openssh-client \
|
||||
git || true \
|
||||
&& dpkg --purge --force-all libc-bin \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
openssh-client \
|
||||
git \
|
||||
# End of Black Magic
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir -p /etc/ansible/roles \
|
||||
&& mkdir -p /etc/ansible/collections \
|
||||
&& mkdir -p /workdir \
|
||||
&& apt list --installed
|
||||
|
||||
|
||||
WORKDIR /workdir
|
||||
|
||||
|
||||
COPY ansible.cfg /etc/ansible/ansible.cfg
|
||||
|
||||
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
RUN pip install --index-url https://gitlab.com/api/v4/projects/45741845/packages/pypi/simple -r /tmp/requirements.txt
|
||||
|
||||
|
||||
RUN ansible-galaxy collection install \
|
||||
awx.awx \
|
||||
kubernetes.core
|
74
dockerfile-build_cache
Normal file
74
dockerfile-build_cache
Normal file
@ -0,0 +1,74 @@
|
||||
FROM --platform=$TARGETPLATFORM python:3.11-bullseye as wheelbuild
|
||||
|
||||
ARG CI_JOB_TOKEN
|
||||
ARG CI_API_V4_URL
|
||||
ARG CI_PROJECT_ID
|
||||
|
||||
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
ENV PATH /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin::~/.cargo/bin
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& dpkg-reconfigure debconf -f noninteractive
|
||||
|
||||
RUN apt update \
|
||||
&& apt install --reinstall -yq \
|
||||
git \
|
||||
curl \
|
||||
rustc cargo || true
|
||||
|
||||
|
||||
RUN mkdir -p /tmp/python_modules /tmp/python_builds
|
||||
|
||||
|
||||
RUN rustc --version \
|
||||
&& cargo --version
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt update \
|
||||
&& apt --fix-broken install \
|
||||
&& apt install -y libc-bin locales-all \
|
||||
&& apt update \
|
||||
&& apt install --reinstall -yq \
|
||||
openssh-client \
|
||||
git || true \
|
||||
&& dpkg --purge --force-all libc-bin \
|
||||
&& apt-get install -y \
|
||||
openssh-client \
|
||||
git
|
||||
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt update \
|
||||
&& apt install --no-install-recommends -yq libc-bin locales-all \
|
||||
&& apt-get install --reinstall -yq \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
libffi-dev \
|
||||
python3-dev \
|
||||
cargo \
|
||||
pkg-config || true
|
||||
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
RUN pip install --upgrade \
|
||||
setuptools \
|
||||
wheel \
|
||||
setuptools-rust \
|
||||
twine
|
||||
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
|
||||
RUN cd /tmp/python_modules \
|
||||
&& pip download --dest . --check-build-dependencies \
|
||||
-r /tmp/requirements.txt
|
||||
|
||||
|
||||
RUN cd /tmp/python_modules \
|
||||
# && export PATH=$PATH:~/.cargo/bin \
|
||||
&& echo "[DEBUG] PATH=$PATH" \
|
||||
&& pip wheel --wheel-dir /tmp/python_builds --find-links . *.whl
|
||||
|
||||
|
||||
RUN TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --verbose --skip-existing --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi /tmp/python_builds/*
|
1
gitlab-ci
Submodule
1
gitlab-ci
Submodule
Submodule gitlab-ci added at 18a2808787
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
ansible-core==2.14.5
|
||||
ansible-lint==6.15.0
|
Reference in New Issue
Block a user