aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
blob: 89432135e2607563be1f6adf5d039ac029101120 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# #############################################################################
# Copyright (c) 2018 Intel Corp.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
# #############################################################################

cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible

sed -i 's/^container_enabled.*/container_enabled: false/g' group_vars/common.yml

sed -i 's/^nbp_plugin_type.*/nbp_plugin_type: csi/g' group_vars/common.yml

sed -i 's/^workplace.*/workplace: \/root/g' group_vars/common.yml

sed -i 's/^enabled_backend.*/enabled_backend: ceph/g' group_vars/osdsdock.yml

sed -i 's/^ceph_origin.*/ceph_origin: repository/g' group_vars/ceph/all.yml

sed -i 's/^ceph_repository.*/ceph_repository: community/g' group_vars/ceph/all.yml

sed -i 's/^ceph_stable_release.*/ceph_stable_release: luminous/g' group_vars/ceph/all.yml

sed -i 's|^public_network.*|public_network: '"$1"'|g' group_vars/ceph/all.yml

sed -i 's|^cluster_network.*|cluster_network: '"$2"'|g' group_vars/ceph/all.yml

sed -i 's/^monitor_interface.*/monitor_interface: eth0/g' group_vars/ceph/all.yml

sed -i 's/^devices:.*/devices: [\/dev\/loop0, \/dev\/loop1, \/dev\/loop2]/g' group_vars/ceph/all.yml

sed -i '/dev\/sda/s/^/#/g' group_vars/ceph/all.yml

sed -i 's/^osd_scenario.*/osd_scenario: collocated/g' group_vars/ceph/osds.yml

sed -i 's/^db_endpoint.*/db_endpoint: localhost:62379,localhost:62380/g' group_vars/osdsdb.yml

sed -i 's/^etcd_host.*/etcd_host: 127.0.0.1/g' group_vars/osdsdb.yml

sed -i 's/^etcd_port.*/etcd_port: 62379/g' group_vars/osdsdb.yml

sed -i 's/^etcd_peer_port.*/etcd_peer_port: 62380/g' group_vars/osdsdb.yml

sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/auth.yml

sed -i  '/check_ansible_version/a \  ignore_errors: yes\' roles/common/tasks/main.yml

sed -i '/- dashboard-installer/s/^/#/g' site.yml

# comment csi create pods in Stor4nfv
sed -i '/kubectl create/s/^/#/g' roles/nbp-installer/scenarios/csi.yml

sed -i 's/^opensds_endpoint.*/opensds_endpoint: http:\/\/'"$1"':50040/g' group_vars/common.yml

sed -i '/and service_ceph_osd_status.rc == 0/s/^/#/g' roles/osdsdock/scenarios/ceph.yml
sed -i  '/and service_ceph_osd_status.rc == 0/a \  when: service_ceph_mon_status.rc == 0\' \
       roles/osdsdock/scenarios/ceph.yml