-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rackerlabs:main' into development
- Loading branch information
Showing
12 changed files
with
354 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Migrate Images to GHCR | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.original-images.json' | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: "quay.io" | ||
IMAGE_ORG: "rackspace" | ||
|
||
jobs: | ||
setup-matrix: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
matrix: ${{ steps.parse-json.outputs.matrix }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Ensure jq is installed | ||
run: | | ||
if ! command -v jq &> /dev/null; then | ||
echo "jq is not installed. Installing now..." | ||
sudo apt-get update && sudo apt-get install -y jq | ||
else | ||
echo "jq is already installed." | ||
fi | ||
- name: Read images from .original-images.json | ||
id: parse-json | ||
run: | | ||
IMAGES=$(jq -c '.' < .original-images.json) | ||
echo "Images: $IMAGES" | ||
echo "matrix=$IMAGES" >> $GITHUB_OUTPUT | ||
migrate-images: | ||
needs: setup-matrix | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
max-parallel: 10 | ||
matrix: | ||
image: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | ||
|
||
steps: | ||
- name: Pull image from Source Registry | ||
run: | | ||
echo "Pulling image: ${{ matrix.image }}" | ||
docker pull ${{ matrix.image }} | ||
- name: Login to Quay Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ secrets.QUAY_USER }} | ||
password: ${{ secrets.QUAY_TOKEN }} | ||
|
||
- name: Retag Image for quay | ||
id: retag | ||
run: | | ||
IMAGE_FULL="${{ matrix.image }}" | ||
IMAGE_NAME_WITH_TAG=$(basename $IMAGE_FULL) # Remove registry prefix | ||
IMAGE_NAME_ONLY="$(echo $IMAGE_NAME_WITH_TAG | cut -d: -f1)" # Extract image name | ||
IMAGE_TAG="$(echo $IMAGE_NAME_WITH_TAG | cut -d: -f2)" # Extract tag | ||
QUAY_IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_ORG }}/rackerlabs-$IMAGE_NAME_ONLY:$IMAGE_TAG" | ||
echo $QUAY_IMAGE | ||
echo "Retagging ${{ matrix.image }} to $QUAY_IMAGE" | ||
docker tag ${{ matrix.image }} $QUAY_IMAGE | ||
echo "QUAY_IMAGE=$QUAY_IMAGE" >> $GITHUB_OUTPUT | ||
- name: Push to Quay | ||
run: | | ||
docker push ${{ steps.retag.outputs.QUAY_IMAGE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[ | ||
"docker.io/openstackhelm/heat:2024.1-ubuntu_jammy", | ||
"ghcr.io/rackerlabs/genestack/octavia-ovn:master-ubuntu_jammy-1733266356", | ||
"docker.io/openstackhelm/glance:2024.1-ubuntu_jammy", | ||
"ghcr.io/rackerlabs/genestack/keystone-rxt:2024.1-ubuntu_jammy-1735886895", | ||
"docker.io/openstackhelm/barbican:2023.1-ubuntu_jammy", | ||
"ghcr.io/rackerlabs/genestack/nova-efi:2024.1-ubuntu_jammy-1723129048", | ||
"docker.io/openstackhelm/ceph-config-helper:latest-ubuntu_jammy" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
# Copyright 2024, Rackspace Technology, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
- name: Ensure TuneD is installed | ||
ansible.builtin.apt: | ||
name: tuned | ||
state: present | ||
|
||
- name: Ensure TuneD service is enabled and started | ||
ansible.builtin.systemd: | ||
name: tuned | ||
enabled: true | ||
state: started | ||
|
||
- name: Apply throughput-performance profile using tuned-adm | ||
ansible.builtin.command: | ||
cmd: "/usr/sbin/tuned-adm profile throughput-performance" | ||
changed_when: true | ||
|
||
- name: Verify active TuneD profile | ||
ansible.builtin.command: | ||
cmd: "/usr/sbin/tuned-adm active" | ||
register: tuned_active | ||
|
||
- name: Show active TuneD profile | ||
ansible.builtin.debug: | ||
msg: "{{ tuned_active.stdout }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
# Copyright 2024, Rackspace Technology, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
- name: Refresh specific kernel facts | ||
ansible.builtin.setup: | ||
filter: "ansible_kernel" | ||
|
||
- name: Check Kernel Version | ||
fail: | ||
msg: > | ||
Wrong kernel Version found | ||
[ {{ ansible_facts['kernel'] }} < {{ host_required_kernel }} ] | ||
Resolve this issue before continuing. | ||
when: | ||
- ansible_facts['kernel'] is version(host_required_kernel, '<') | ||
|
||
- name: Pin kernel packages version | ||
copy: | ||
dest: "{{ apt_preferences }}/pin-kernel" | ||
content: | | ||
Package: linux-image-{{ ansible_facts['kernel'] }} | ||
Pin: release * | ||
Pin-Priority: 1001 | ||
Package: linux-headers-{{ ansible_facts['kernel'] }} | ||
Pin: release * | ||
Pin-Priority: 1001 | ||
Package: linux-modules-{{ ansible_facts['kernel'] }} | ||
Pin: release * | ||
Pin-Priority: 1001 | ||
Package: linux-image-* | ||
Pin: release * | ||
Pin-Priority: -1 | ||
Package: linux-headers-* | ||
Pin: release * | ||
Pin-Priority: -1 | ||
Package: linux-modules-* | ||
Pin: release * | ||
Pin-Priority: -1 | ||
mode: '0644' | ||
when: | ||
- ansible_facts['kernel'] is version(host_required_kernel, '<') | ||
|
||
- name: Disable unattended-upgrades | ||
ansible.builtin.lineinfile: | ||
path: "{{ apt_config_dir }}/20auto-upgrades" | ||
regexp: "^APT::Periodic::{{ item.key }}" | ||
line: "APT::Periodic::{{ item.key }} \"{{ item.value }}\";" | ||
create: true | ||
mode: '0644' | ||
loop: | ||
- { key: "Update-Package-Lists", value: "0" } | ||
- { key: "Download-Upgradeable-Packages", value: "0" } | ||
- { key: "AutocleanInterval", value: "0" } | ||
- { key: "Unattended-Upgrade", value: "0" } | ||
|
||
|
||
- name: Ensure unattended-upgrades package is removed | ||
ansible.builtin.apt: | ||
name: unattended-upgrades | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.