-
Notifications
You must be signed in to change notification settings - Fork 0
/
tips.txt
67 lines (46 loc) · 3.08 KB
/
tips.txt
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
61
62
63
64
65
66
67
#Verify internet connectivity and dns resolution
ansible all -e shell -a "ping -c 1 google.com"
#Verify all lxc bridges are accesible from guests
ansible all -e shell -a "ping -c 1 10.0.3.1"
#Display lxc-containers and their
lxc-ls -f
for container in $(lxc-ls); do lxc-stop -r --name $container; done
ansible galera_container -m shell -a "mysql -h 127.0.0.1 -e 'show status like \"%wsrep_cluster_%\";'"
ceph_volume:
volume_driver: cinder.volume.drivers.rbd.RBDDriver
rbd_pool: volumes_hdd
rbd_ceph_conf: /etc/ceph/ceph.conf
rbd_flatten_volume_from_snapshot: 'false'
rbd_max_clone_depth: 5
rbd_store_chunk_size: 4
rados_connect_timeout: -1
volume_backend_name: ceph_volume
rbd_user: "{{ cinder_ceph_client }}"
rbd_secret_uuid: "{{ cinder_ceph_client_uuid }}"
Galera
ansible galera_container -m shell -a "mysql -h 127.0.0.1 \
-e 'show status like \"%wsrep_cluster_%\";'"
ansible galera_container -m shell -a "cat /var/lib/mysql/grastate.dat"
systemctl set-environment _WSREP_NEW_CLUSTER='--wsrep-new-cluster'
systemctl start mysql
systemctl set-environment _WSREP_NEW_CLUSTER=''
ansible galera_container -m shell -a "systemctl set-environment _WSREP_NEW_CLUSTER='--wsrep-new-cluster'" --limit galera_container[0]
ansible galera_container -m shell -a "systemctl start mysql" --limit galera_container[0]
ansible galera_container -m shell -a "systemctl set-environment _WSREP_NEW_CLUSTER=''" --limit galera_container[0]
ansible galera_container -m shell -a "/etc/init.d/mysql start --wsrep-new-cluster" --limit galera_container[0]
ansible galera_container -m shell -a "systemctl start mysql" --limit galera_container[1:]
Destroy and rebuild containers:
openstack-ansible lxc-containers-destroy.yml --limit cloudbc1bl01_cinder_scheduler_container-191f15b0,cloudbc1bl02_cinder_scheduler_container-f2a7c81f,cloudbc2bl01_cinder_scheduler_container-77504a8e,cloudbc1bl01_cinder_api_container-e6bf130b,cloudbc1bl02_cinder_api_container-c568a4e0,cloudbc2bl01_cinder_api_container-00f3635f
openstack-ansible lxc-containers-create.yml --limit cloudbc1bl01_cinder_scheduler_container-191f15b0,cloudbc1bl02_cinder_scheduler_container-f2a7c81f,cloudbc2bl01_cinder_scheduler_container-77504a8e,cloudbc1bl01_cinder_api_container-e6bf130b,cloudbc1bl02_cinder_api_container-c568a4e0,cloudbc2bl01_cinder_api_container-00f3635f
openstack-ansible setup-hosts.yml -l cloudbc1bl01,cloudbc1bl02,cloudbc2bl01
openstack-ansible setup-infrastructure.yml --limit cloudbc1bl01_cinder_scheduler_container-191f15b0,cloudbc1bl02_cinder_scheduler_container-f2a7c81f,cloudbc2bl01_cinder_scheduler_container-77504a8e,cloudbc1bl01_cinder_api_container-e6bf130b,cloudbc1bl02_cinder_api_container-c568a4e0,cloudbc2bl01_cinder_api_container-00f3635f
### Network
openstack subnet create \
--subnet-range 213.83.166.108/30 \
--gateway 213.83.166.108 \
--network vlan11-internet \
--allocation-pool start=213.83.166.109,end=213.83.166.109 \
--dns-nameserver 212.242.40.3 \
--dns-nameserver=212.242.40.51 \
--no-dhcp \
vlan11_linknet1