Difference between revisions of "Setup OpenStack with Virtuozzo 7"
m (add 'translate' tags) |
(Marked this version for translation) |
||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
+ | <!--T:1--> | ||
This howto describes steps by step installation of OpenStack devstack with [[Virtuozzo]] 7. | This howto describes steps by step installation of OpenStack devstack with [[Virtuozzo]] 7. | ||
+ | <!--T:2--> | ||
Execute the following commands within you Virtuozzo 7 host as root: | Execute the following commands within you Virtuozzo 7 host as root: | ||
+ | <!--T:3--> | ||
Install RDO repo: | Install RDO repo: | ||
− | $ yum install -y https://rdoproject.org/repos/rdo-release.rpm | + | <!--T:4--> |
+ | $ yum install -y https://rdoproject.org/repos/rdo-release.rpm | ||
+ | <!--T:5--> | ||
Install EPEL repo: | Install EPEL repo: | ||
$ yum install -y http://fedora-mirror01.rbc.ru/pub/epel//epel-release-latest-7.noarch.rpm | $ yum install -y http://fedora-mirror01.rbc.ru/pub/epel//epel-release-latest-7.noarch.rpm | ||
+ | <!--T:6--> | ||
Install required packages: | Install required packages: | ||
$ yum install -y git patch redhat-lsb-core euca2ools mysql-connector-python scsi-target-utils | $ yum install -y git patch redhat-lsb-core euca2ools mysql-connector-python scsi-target-utils | ||
+ | <!--T:7--> | ||
Reinstall http and mod_wsgi: | Reinstall http and mod_wsgi: | ||
− | $ yum remove -y httpd httpd-tools mod_wsgi | + | <!--T:8--> |
+ | $ yum remove -y httpd httpd-tools mod_wsgi | ||
$ yum install -y httpd | $ yum install -y httpd | ||
+ | <!--T:9--> | ||
Enable IP connection tracking for CT0: | Enable IP connection tracking for CT0: | ||
− | $ echo -ne "options nf_conntrack ip_conntrack_disable_ve0=0\n" > /etc/modprobe.d/vz.conf | + | <!--T:10--> |
+ | $ echo -ne "options nf_conntrack ip_conntrack_disable_ve0=0\n" > /etc/modprobe.d/vz.conf | ||
$ echo -ne "options nf_conntrack ip_conntrack_disable_ve0=0\n" > /etc/modprobe.d/parallels.conf | $ echo -ne "options nf_conntrack ip_conntrack_disable_ve0=0\n" > /etc/modprobe.d/parallels.conf | ||
+ | <!--T:11--> | ||
Then reboot your system: | Then reboot your system: | ||
− | $ reboot | + | <!--T:12--> |
+ | $ reboot | ||
+ | <!--T:13--> | ||
Create user "stack" and add him to sudoers: | Create user "stack" and add him to sudoers: | ||
− | $ adduser stack -d /vz/stack | + | <!--T:14--> |
+ | $ adduser stack -d /vz/stack | ||
$ chmod 755 /vz/stack | $ chmod 755 /vz/stack | ||
$ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | $ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | ||
+ | <!--T:15--> | ||
Download and unpack container image: | Download and unpack container image: | ||
− | $ su stack -c "cd ~ && wget http://updates.virtuozzo.com/server/virtuozzo/en_us/odin/7/techpreview-ct/centos7-exe.hds.tar.gz" | + | <!--T:16--> |
+ | $ su stack -c "cd ~ && wget http://updates.virtuozzo.com/server/virtuozzo/en_us/odin/7/techpreview-ct/centos7-exe.hds.tar.gz" | ||
$ su stack -c "cd ~ && tar -xzvf centos7-exe.hds.tar.gz" | $ su stack -c "cd ~ && tar -xzvf centos7-exe.hds.tar.gz" | ||
+ | <!--T:17--> | ||
Clone devstack: | Clone devstack: | ||
$ su stack -c "cd ~ && git clone git://git.openstack.org/openstack-dev/devstack" | $ su stack -c "cd ~ && git clone git://git.openstack.org/openstack-dev/devstack" | ||
+ | <!--T:18--> | ||
Create local.conf file: | Create local.conf file: | ||
− | $ cat > ~stack/devstack/local.conf << _EOF | + | <!--T:19--> |
+ | $ cat > ~stack/devstack/local.conf << _EOF | ||
<nowiki>[[local|localrc]]</nowiki> | <nowiki>[[local|localrc]]</nowiki> | ||
FORCE=yes | FORCE=yes | ||
Line 85: | Line 104: | ||
_EOF | _EOF | ||
+ | <!--T:20--> | ||
Change HOST_IP within created ~stack/devstack/local.conf to a valid IP address of your Virtuozzo 7 host. | Change HOST_IP within created ~stack/devstack/local.conf to a valid IP address of your Virtuozzo 7 host. | ||
Change password for OpenStack services to whatever you prefer in ~stack/devstack/local.conf. | Change password for OpenStack services to whatever you prefer in ~stack/devstack/local.conf. | ||
Make libvirt daemon accessible via socket for stack user: | Make libvirt daemon accessible via socket for stack user: | ||
− | $ sed -i s/"#unix_sock_group = \"libvirt\""/"unix_sock_group = \"stack\""/ /etc/libvirt/libvirtd.conf | + | <!--T:21--> |
+ | $ sed -i s/"#unix_sock_group = \"libvirt\""/"unix_sock_group = \"stack\""/ /etc/libvirt/libvirtd.conf | ||
$ sed -i s/"#unix_sock_ro_perms = \"0777\""/"unix_sock_ro_perms = \"0777\""/ /etc/libvirt/libvirtd.conf | $ sed -i s/"#unix_sock_ro_perms = \"0777\""/"unix_sock_ro_perms = \"0777\""/ /etc/libvirt/libvirtd.conf | ||
$ sed -i s/"#unix_sock_rw_perms = \"0770\""/"unix_sock_rw_perms = \"0770\""/ /etc/libvirt/libvirtd.conf | $ sed -i s/"#unix_sock_rw_perms = \"0770\""/"unix_sock_rw_perms = \"0770\""/ /etc/libvirt/libvirtd.conf | ||
Line 96: | Line 117: | ||
$ sed -i s/"#auth_unix_rw = \"none\""/"auth_unix_rw = \"none\""/ /etc/libvirt/libvirtd.conf | $ sed -i s/"#auth_unix_rw = \"none\""/"auth_unix_rw = \"none\""/ /etc/libvirt/libvirtd.conf | ||
+ | <!--T:22--> | ||
Clone nova repository: | Clone nova repository: | ||
− | $ su stack -c "cd ~ && git clone git://git.openstack.org/openstack/nova" | + | <!--T:23--> |
+ | $ su stack -c "cd ~ && git clone git://git.openstack.org/openstack/nova" | ||
+ | <!--T:24--> | ||
Make libvirt 1.2.8 be minimum required version to run with Virtuozzo: | Make libvirt 1.2.8 be minimum required version to run with Virtuozzo: | ||
− | $ sed -i -e "s/MIN_LIBVIRT_PARALLELS_VERSION = (1, 2, 12)/MIN_LIBVIRT_PARALLELS_VERSION = (1, 2, 8)/" ~stack/nova/nova/virt/libvirt/driver.py | + | <!--T:25--> |
+ | $ sed -i -e "s/MIN_LIBVIRT_PARALLELS_VERSION = (1, 2, 12)/MIN_LIBVIRT_PARALLELS_VERSION = (1, 2, 8)/" ~stack/nova/nova/virt/libvirt/driver.py | ||
+ | <!--T:26--> | ||
Start devstack: | Start devstack: | ||
− | $ su stack -c "~/devstack/stack.sh" | + | <!--T:27--> |
+ | $ su stack -c "~/devstack/stack.sh" | ||
+ | <!--T:28--> | ||
After script finishes, setup your iptables rules to allow incoming http trafic if you want to use OpenStack dashboard. For instance: | After script finishes, setup your iptables rules to allow incoming http trafic if you want to use OpenStack dashboard. For instance: | ||
− | $ iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited | + | <!--T:29--> |
+ | $ iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited | ||
$ iptables -A INPUT -p tcp --dport http -j ACCEPT | $ iptables -A INPUT -p tcp --dport http -j ACCEPT | ||
$ iptables -A INPUT -j REJECT | $ iptables -A INPUT -j REJECT | ||
+ | <!--T:30--> | ||
Here you are! | Here you are! | ||
</translate> | </translate> | ||
[[Category: HOWTO]] | [[Category: HOWTO]] |
Revision as of 22:28, 25 December 2015
<translate> This howto describes steps by step installation of OpenStack devstack with Virtuozzo 7.
Execute the following commands within you Virtuozzo 7 host as root:
Install RDO repo:
$ yum install -y https://rdoproject.org/repos/rdo-release.rpm
Install EPEL repo:
$ yum install -y http://fedora-mirror01.rbc.ru/pub/epel//epel-release-latest-7.noarch.rpm
Install required packages:
$ yum install -y git patch redhat-lsb-core euca2ools mysql-connector-python scsi-target-utils
Reinstall http and mod_wsgi:
$ yum remove -y httpd httpd-tools mod_wsgi
$ yum install -y httpd
Enable IP connection tracking for CT0:
$ echo -ne "options nf_conntrack ip_conntrack_disable_ve0=0\n" > /etc/modprobe.d/vz.conf
$ echo -ne "options nf_conntrack ip_conntrack_disable_ve0=0\n" > /etc/modprobe.d/parallels.conf
Then reboot your system:
$ reboot
Create user "stack" and add him to sudoers:
$ adduser stack -d /vz/stack
$ chmod 755 /vz/stack $ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
Download and unpack container image:
$ su stack -c "cd ~ && wget http://updates.virtuozzo.com/server/virtuozzo/en_us/odin/7/techpreview-ct/centos7-exe.hds.tar.gz"
$ su stack -c "cd ~ && tar -xzvf centos7-exe.hds.tar.gz"
Clone devstack:
$ su stack -c "cd ~ && git clone git://git.openstack.org/openstack-dev/devstack"
Create local.conf file:
$ cat > ~stack/devstack/local.conf << _EOF
[[local|localrc]] FORCE=yes HOST_IP=1.1.1.1 MYSQL_PASSWORD=password SERVICE_TOKEN=password SERVICE_PASSWORD=password ADMIN_PASSWORD=password LIBVIRT_TYPE=parallels RABBIT_PASSWORD=password #Basic services ENABLED_SERVICES=key,rabbit,mysql,horizon # Enable Nova services ENABLED_SERVICES+=,n-api,n-crt,n-cpu,n-cond,n-sch,n-novnc,n-cauth # Enable Glance services ENABLED_SERVICES+=,g-api,g-reg # Enable Cinder services #ENABLED_SERVICES+=,c-sch,c-api,c-vol # Enable Heat, to test orchestration #ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng # Enable Neutron services ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron # Destination path for installation DEST=/vz/stack # Destination for working data DATA_DIR=/vz/stack/data # Destination for status files SERVICE_DIR=/vz/stack/status LOG_COLOR=False LOGDAYS=3 LOGFILE=/vz/stack/logs/stack.sh.log SCREEN_LOGDIR=/vz/stack/logs/screen ENABLE_METADATA_NETWORK=True ENABLE_ISOLATED_METADATA=True IMAGE_URLS="file:///vz/stack/centos7-exe.hds" _EOF
Change HOST_IP within created ~stack/devstack/local.conf to a valid IP address of your Virtuozzo 7 host. Change password for OpenStack services to whatever you prefer in ~stack/devstack/local.conf. Make libvirt daemon accessible via socket for stack user:
$ sed -i s/"#unix_sock_group = \"libvirt\""/"unix_sock_group = \"stack\""/ /etc/libvirt/libvirtd.conf
$ sed -i s/"#unix_sock_ro_perms = \"0777\""/"unix_sock_ro_perms = \"0777\""/ /etc/libvirt/libvirtd.conf $ sed -i s/"#unix_sock_rw_perms = \"0770\""/"unix_sock_rw_perms = \"0770\""/ /etc/libvirt/libvirtd.conf $ sed -i s/"#unix_sock_dir = \"\/var\/run\/libvirt\""/"unix_sock_dir = \"\/var\/run\/libvirt\""/ /etc/libvirt/libvirtd.conf $ sed -i s/"#auth_unix_ro = \"none\""/"auth_unix_ro = \"none\""/ /etc/libvirt/libvirtd.conf $ sed -i s/"#auth_unix_rw = \"none\""/"auth_unix_rw = \"none\""/ /etc/libvirt/libvirtd.conf
Clone nova repository:
$ su stack -c "cd ~ && git clone git://git.openstack.org/openstack/nova"
Make libvirt 1.2.8 be minimum required version to run with Virtuozzo:
$ sed -i -e "s/MIN_LIBVIRT_PARALLELS_VERSION = (1, 2, 12)/MIN_LIBVIRT_PARALLELS_VERSION = (1, 2, 8)/" ~stack/nova/nova/virt/libvirt/driver.py
Start devstack:
$ su stack -c "~/devstack/stack.sh"
After script finishes, setup your iptables rules to allow incoming http trafic if you want to use OpenStack dashboard. For instance:
$ iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited
$ iptables -A INPUT -p tcp --dport http -j ACCEPT $ iptables -A INPUT -j REJECT
Here you are! </translate>