-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup_steps
32 lines (28 loc) · 1.39 KB
/
setup_steps
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
# setup a devstack including stack user, reference https://docs.openstack.org/devstack/latest/
git clone https://git.openstack.org/openstack-dev/devstack
git clone https://github.com/sjamgade/monasca-autoscaling.git
cd devstack/
wget https://raw.githubusercontent.com/sjamgade/monasca-autoscaling/master/environment/local.conf
./stack.sh
# vi /etc/monasca/monasca-api.conf
# or vi /etc/monasca-api/api-config.conf
# add monasca-agent to delegate_authorized_roles
sed -i 's/\(^delegate_authorized_roles.*$\)/\1, monasca-agent/g' /etc/monasca-api/monasca-api.conf
sed -i 's/\(^delegate_authorized_roles.*$\)/\1, monasca-agent/g' /etc/monasca-api/api-config.conf
pushd ~
git clone https://github.com/sjamgade/monasca-autoscaling
cd monasca-autoscaling/scripts
./start_service.sh
sudo systemctl restart apache2
/opt/monasca-agent/bin/pip install monasca-agent[libvirt]
sudo /opt/monasca-agent/bin/monasca-setup -d libvirt
# set `vm_probation: 0` in /etc/monasca/agent/conf.d/libvirt.yaml
cd ~/monasca-autoscaling/scripts
./stop_services.sh
openstack security group delete testvm || :
openstack security group create --description testvm testvm
openstack security group rule create --protocol icmp testvm
openstack security group rule create --protocol tcp --dst-port 1:65535 testvm
openstack security group rule create --protocol udp --dst-port 1:65535 testvm
# copy public key do the snapshot host
# copy bash_history