diff --git a/compose.yaml b/compose.yaml index 8c2aa709..f8996ff7 100644 --- a/compose.yaml +++ b/compose.yaml @@ -46,6 +46,8 @@ services: environment: - ANSIBLE_CONFIG=/mini-lab/ansible.cfg - ANSIBLE_INVENTORY=inventories/partition.yaml,clab-mini-lab/ansible-inventory.yml + - KUBECONFIG=/mini-lab/.kubeconfig + - K8S_AUTH_KUBECONFIG=/mini-lab/.kubeconfig - CI=${CI} - DOCKER_HUB_USER=${DOCKER_HUB_USER} - DOCKER_HUB_TOKEN=${DOCKER_HUB_TOKEN} diff --git a/deploy_partition.yaml b/deploy_partition.yaml index d9a7e08a..349b1f4f 100644 --- a/deploy_partition.yaml +++ b/deploy_partition.yaml @@ -78,6 +78,25 @@ pull: true failed_when: false +- name: Install python client and generate deployment token + hosts: localhost + connection: local + gather_facts: false + pre_tasks: + - name: Wait until the metal-apiserver is running + kubernetes.core.k8s_info: + kind: Deployment + name: metal-apiserver + namespace: "{{ metal_control_plane_namespace }}" + wait: true + wait_sleep: 1 + wait_timeout: 600 + roles: + - name: ansible-common + tags: always + - name: metal-roles/common/roles/metal-v2-client + - name: metal-roles/common/roles/metal-deployment-token + - name: Deploy pixiecore on leaf01 hosts: leaf01 become: true @@ -86,6 +105,8 @@ tags: always - name: metal-roles/partition/roles/pixiecore tags: pixiecore + - name: metal-roles/partition/roles/image-cache + tags: image-cache - name: Deploy monitoring on leaf01 hosts: leaf01 diff --git a/inventories/control-plane.yaml b/inventories/control-plane.yaml index f6d4f244..42af64e0 100644 --- a/inventories/control-plane.yaml +++ b/inventories/control-plane.yaml @@ -3,3 +3,4 @@ control-plane: hosts: localhost: ansible_python_interpreter: "{{ ansible_playbook_python }}" + ansible_connection: local diff --git a/inventories/group_vars/all/release_vector.yaml b/inventories/group_vars/all/release_vector.yaml index f801fffc..7aee7e4c 100644 --- a/inventories/group_vars/all/release_vector.yaml +++ b/inventories/group_vars/all/release_vector.yaml @@ -33,12 +33,15 @@ metal_stack_release_vectors: # ... # +image_cache_sync_image_tag: migrate-to-metal-apiserver +image_cache_sync_image_name: ghcr.io/metal-stack/metal-image-cache-sync + ## ## for ansible roles ## # ansible_common_version: -# metal_roles_version: +metal_roles_version: migrate-metal-image-cache-sync-to-metal-apiserver # metal_ansible_modules_version: ## diff --git a/inventories/group_vars/control-plane/metal.yml b/inventories/group_vars/control-plane/metal.yml index 9e5568d9..6e914d6e 100644 --- a/inventories/group_vars/control-plane/metal.yml +++ b/inventories/group_vars/control-plane/metal.yml @@ -3,6 +3,8 @@ metal_set_resource_limits: no metal_check_api_health_endpoint: http://api.{{ metal_control_plane_ingress_dns }}:8080/metal/v1/health metal_api_headscale_control_plane_address: "http://headscale.{{ metal_control_plane_ingress_dns }}:8080" +# metal_helm_chart_local_path: /helm-charts/charts/metal-control-plane + metal_api_pdb_min_available: 1 metal_api_replicas: 1 metal_api_view_key: metal-view diff --git a/inventories/group_vars/partition/image_cache.yaml b/inventories/group_vars/partition/image_cache.yaml new file mode 100644 index 00000000..71709675 --- /dev/null +++ b/inventories/group_vars/partition/image_cache.yaml @@ -0,0 +1,6 @@ +--- +image_cache_sync_metal_apiserver_url: "http://v2.api.172.17.0.1.nip.io:8080" +image_cache_sync_excludes: + - "/pull_requests/" + - "/stable/" +image_cache_sync_expiration_grace_period: 100 diff --git a/inventories/partition.yaml b/inventories/partition.yaml index c42cbbd3..be146d19 100644 --- a/inventories/partition.yaml +++ b/inventories/partition.yaml @@ -6,6 +6,7 @@ partition: hosts: localhost: ansible_python_interpreter: "{{ ansible_playbook_python }}" + ansible_connection: local children: dell_sonic: leaves: