mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-11 11:27:39 -02:30
Switch to using upstream fuel-ccp project
This commit is contained in:
@@ -1,31 +1,45 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- lineinfile:
|
||||
dest: /etc/hosts
|
||||
regexp: 'registry01-bud.ng.mirantis.net'
|
||||
line: '172.16.180.121 registry01-bud.ng.mirantis.net'
|
||||
|
||||
- hosts: kube-master
|
||||
pre_tasks:
|
||||
- name: Rsync CCP repos
|
||||
synchronize: src=../ccp/microservices-repos/ dest=/root/microservices-repos/
|
||||
- name: Rsync MCP scripts and repo
|
||||
- name: Download fuel-ccp
|
||||
shell: git clone https://git.openstack.org/openstack/fuel-ccp
|
||||
args:
|
||||
chdir: /usr/local/src
|
||||
creates: /usr/local/src/fuel-ccp/setup.py
|
||||
- name: Upload ccp configs to master nodes
|
||||
synchronize:
|
||||
src: ../ccp/
|
||||
dest: /root/ccp/
|
||||
rsync_opts:
|
||||
- "--exclude=/microservices-repos"
|
||||
tasks:
|
||||
- name: Install MCP cli tool
|
||||
shell: "{{ item }}"
|
||||
- name: Install CCP cli tool
|
||||
shell: pip install -U fuel-ccp/
|
||||
args:
|
||||
chdir: /root/ccp/microservices/
|
||||
chdir: /usr/local/src
|
||||
creates: /usr/local/bin/mcp-microservices
|
||||
with_items:
|
||||
- pip install .
|
||||
- python setup.py develop
|
||||
- name: Build CCP images
|
||||
shell: ./ccp-build.sh
|
||||
- name: Get pods
|
||||
shell: kubectl get pods
|
||||
register: get_pod
|
||||
run_once: true
|
||||
- name: Get services
|
||||
shell: kubectl get svc
|
||||
register: get_svc
|
||||
run_once: true
|
||||
- name: Create registry pod
|
||||
shell: kubectl create -f registry_pod.yaml
|
||||
args:
|
||||
chdir: /root/ccp
|
||||
run_once: true
|
||||
- name: Create registry svc
|
||||
shell: kubectl create -f registry_svc.yaml
|
||||
args:
|
||||
chdir: /root/ccp
|
||||
run_once: true
|
||||
when: get_svc.stdout.find('registry') == -1
|
||||
- name: Fetch CCP images
|
||||
shell: mcp-microservices --config-file=/root/ccp/ccp.conf fetch
|
||||
chdir: /usr/local/src
|
||||
run_once: true
|
||||
- name: Build CCP images
|
||||
shell: mcp-microservices --config-file=/root/ccp/ccp.conf build
|
||||
args:
|
||||
chdir: /root/ccp
|
||||
run_once: true
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
- hosts: kube-master
|
||||
pre_tasks:
|
||||
- name: Rsync MCP scripts and repo
|
||||
- name: Rsync CCP configs
|
||||
synchronize:
|
||||
src: ../ccp/
|
||||
dest: /root/ccp/
|
||||
rsync_opts:
|
||||
- "--exclude=/microservices-repos"
|
||||
tasks:
|
||||
- name: Get namespaces
|
||||
shell: kubectl get namespace
|
||||
register: get_ns
|
||||
run_once: true
|
||||
- name: Deploy CCP
|
||||
shell: ./ccp-deploy.sh
|
||||
shell: mcp-microservices --config-file=/root/ccp/ccp.conf deploy
|
||||
args:
|
||||
chdir: /root/ccp
|
||||
run_once: true
|
||||
when: get_ns.stdout.find('openstack') == -1
|
||||
|
||||
Reference in New Issue
Block a user