diff --git a/.beagle.yml b/.beagle.yml new file mode 100644 index 0000000000000000000000000000000000000000..8c04a74558945272623b1e3ac0d4f94615fc4467 --- /dev/null +++ b/.beagle.yml @@ -0,0 +1,86 @@ +platform: 10.11.92.34 + +clone: + git: + image: registry.cn-qingdao.aliyuncs.com/wod/devops-git:1.0 + dns: + - 223.5.5.5 + +pipeline: + + charts: + image: registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12 + pull: true + dns: + - 223.5.5.5 + volumes: + - /data/downloads/k8s/charts/:/charts + environment: + - TGZ_TARGET=harbor-v2.1.1.tgz + commands: + - rm -rf .git + - tar -zcvf $TGZ_TARGET . + - mv $TGZ_TARGET /charts/$TGZ_TARGET + when: + branch: + - master + + ansible-amd64: + image: registry.cn-qingdao.aliyuncs.com/wod/ansible-kubernetes-image:v1.20.2 + pull: true + dns: + - 223.5.5.5 + commands: + - cp -r ./ansible/main.yaml /etc/ansible/linux/main.yaml + - cd ansible + - >- + ansible-playbook /etc/ansible/linux/main.yaml + --extra-vars + '{ + "TARGET_ARCH":"amd64", + "TARGET_VERSION":"v2.1.1" + }' + --extra-vars "@images.yaml" + when: + branch: + - master + + ansible-arm64: + image: registry.cn-qingdao.aliyuncs.com/wod/ansible-kubernetes-image:v1.20.2 + pull: true + dns: + - 223.5.5.5 + commands: + - cp -r ./ansible/main.yaml /etc/ansible/linux/main.yaml + - cd ansible + - >- + ansible-playbook /etc/ansible/linux/main.yaml + --extra-vars + '{ + "TARGET_ARCH":"arm64", + "TARGET_VERSION":"v2.1.1" + }' + --extra-vars "@images.yaml" + when: + branch: + - master + + ansible-ppc64le: + image: registry.cn-qingdao.aliyuncs.com/wod/ansible-kubernetes-image:v1.20.2 + pull: true + dns: + - 223.5.5.5 + commands: + - cp -r ./ansible/main.yaml /etc/ansible/linux/main.yaml + - cd ansible + - >- + ansible-playbook /etc/ansible/linux/main.yaml + --extra-vars + '{ + "TARGET_ARCH":"ppc64le", + "TARGET_VERSION":"v2.1.1" + }' + --extra-vars "@images.yaml" + when: + branch: + - master \ No newline at end of file diff --git a/ansible/images.yaml b/ansible/images.yaml new file mode 100644 index 0000000000000000000000000000000000000000..db0f63442fb624e4be4023fdd222e3d80e879c6e --- /dev/null +++ b/ansible/images.yaml @@ -0,0 +1,27 @@ +IMAGES: + - repo: harbor-portal + tag: "v2.1.1" + - repo: harbor-core + tag: "v2.1.1" + - repo: harbor-jobservice + tag: "v2.1.1" + - repo: harbor-db + tag: "v2.1.1" + - repo: harbor-registryctl + tag: "v2.1.1" + - repo: harbor-chartmuseum + tag: "v2.1.1" + - repo: harbor-clair + tag: "v2.1.1" + - repo: harbor-clair-adapter + tag: "v2.1.1" + - repo: harbor-trivy-adapter + tag: "v2.1.1" + - repo: harbor-notary-server + tag: "v2.1.1" + - repo: harbor-notary-signer + tag: "v2.1.1" + - repo: registry + tag: "2.7.1" + - repo: redis + tag: "6.0.9" \ No newline at end of file diff --git a/ansible/main.yaml b/ansible/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..301c0aab3106804a63724398910f0f292e291e65 --- /dev/null +++ b/ansible/main.yaml @@ -0,0 +1,10 @@ +- hosts: all + gather_facts: False + vars: + REGISTRY_DATA_PATH: '/data/downloads/k8s/registry/{{ TARGET_ARCH }}' + REGISTRY_DATA_FILE: "images-harbor-{{ TARGET_VERSION }}.tar.gz" + roles: + - role: wod.registry + - role: wod.registry-cache + CACHE_IMAGES: '{{ IMAGES }}' + - role: wod.tgz \ No newline at end of file