Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hungnt1 committed Apr 11, 2019
2 parents 416ed40 + 638c38c commit c8fe809
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 49 deletions.
14 changes: 8 additions & 6 deletions High-availability/7. Cluster-Openstack/Pacemaker/3.Glance.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ openstack endpoint create --region RegionOne image admin http://controller:9292
## 2.3. Thực hiện trên tất cả Controlller


- Cài đặt package
```
yum install -y openstack-glance
```


- Cấu hình NFS Client
```
yum -y install nfs-utils
Expand All @@ -98,11 +105,6 @@ storage1:/var/nfsshare /var/lib/glance nfs defaults 0 0
EOF
```

- Cài đặt package
```
yum install -y openstack-glance
```

- Khởi tạo file cấu hình Glance API
```
Expand Down Expand Up @@ -201,4 +203,4 @@ firewall-cmd --reload



END.
END.
Original file line number Diff line number Diff line change
Expand Up @@ -41,43 +41,10 @@ yum install haproxy -y
```


- Khởi tạo file cấu hình ban đầu cho HAProxy
```
cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.orig
cat <<EOF > /etc/haproxy/haproxy.cfg
global
chroot /var/lib/haproxy
daemon
group haproxy
maxconn 4000
pidfile /var/run/haproxy.pid
user haproxy
defaults
log global
maxconn 4000
option redispatch
retries 3
mode http
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout check 10s
listen stats 192.168.50.140:9000
mode http
stats enable
stats uri /stats
stats realm HAProxy\ Statistics
stats auth admin:123@123Aa
stats admin if TRUE
- Khởi tạo file cấu hình ban đầu cho HAProxy

- https://github.com/nguyenhungsync/Openstack_Research/blob/master/High-availability/7.%20Cluster-Openstack/Pacemaker/10.HAproxy-Service.md

EOF
```


- Cấu hình FirewallD - stat webpage
Expand Down Expand Up @@ -196,10 +163,10 @@ yum install -y chrony

- Cấu hình NTP Server - Cho phép subnet 192.168.50.0/24 đồng bộ
```
sed -i "s/server.*/server 0.asia.pool.ntp.org iburst/g" /etc/chrony.conf > /dev/nul
sed -i "s/server.*/server vn.pool.ntp.org iburst/g" /etc/chrony.conf > /dev/nul
echo "allow 192.168.50.0/24" >> /etc/chrony.conf
systemctl enable chronyd.service
systemctl start chronyd.service
systemctl restart chronyd.service
```

- Cấu hình FirewallD
Expand Down Expand Up @@ -623,10 +590,7 @@ firewall-cmd --add-port={4369/tcp,25672/tcp} --permanent ## RabitMQ Cluster Port
firewall-cmd --reload
```

- Cấu hình HA policy
```
rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
```


### 6.2. Khởi động Cluster

Expand All @@ -652,6 +616,10 @@ rabbitmqctl start_app
```

- Cấu hình HA policy
```
rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
```

- Kiểm tra Cluster
```
Expand Down Expand Up @@ -723,4 +691,4 @@ Memcached_servers = controller1:11211,controller2:11211,controller3:11211
```


END.
END.

0 comments on commit c8fe809

Please sign in to comment.