Changes

Jump to: navigation, search

Setup OpenStack with Virtuozzo 7

5,802 bytes removed, 13:51, 5 February 2016
Replaced content with "{{Virtuozzo}} <translate> <!--T:1--> This howto describes steps by step installation of OpenStack devstack with Virtuozzo 7. <!--T:2--> Clone virtuozzo scripts: $ c..."
<!--T:2-->
Execute the following commands within you Virtuozzo 7 host as rootClone virtuozzo scripts:
<!--T:3-->Install RDO repo:$ cd /vz <!--T:4-->$ yum install -y git clone https://rdoprojectgithub.orgcom/reposvirtuozzo/rdovirtuozzo-openstack-scripts $ cd virtuozzo-release.rpmopenstack-scripts
<!--T:5-->
Install EPEL repo: $ yum install -y http://fedora-mirror01.rbc.ru/pub/epel//epel-release-latest-7.noarch.rpm <!--T:6-->Install required packages: $ yum install -y git patch redhat-lsb-core euca2ools mysql-connector-python scsi-target-utils <!--T:7-->Reinstall http Run the script and mod_wsgi:  <!--T:8-->$ yum remove -y httpd httpd-tools mod_wsgi $ yum install -y httpd <!--T:9-->Enable IP connection tracking for CT0:  <!--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 <!--T:11-->Then reboot your system:  <!--T:12-->$ reboot <!--T:13-->Create user "stack" and add him to sudoers:  <!--T:14-->$ adduser stack -d /vz/stack $ chmod 755 /vz/stack $ echo "stack ALL=follow instructions (ALLif any) NOPASSWD: ALL" >> /etc/sudoers <!--T:15-->Download and unpack container image:  <!--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" <!--T:17-->Clone devstack:
$ su stack -c "cd ~ && git clone git://git.openstack.org/openstack-dev/devstack" <!--T:18-->As soon as we switched to a new linux distribution, which is not supported in upstream devstack yet, apply the following patch to devstack: <pre>diff --git a/functions-common b/functions-commonindex 47276f0..c0cdd3b 100644--- a/functions-common+++ b/functions-common@@ -338,8 +338,9 @@ function GetOSVersion { # XenServer release 6.2.0-70446c (xenenterprise) # Oracle Linux release 7 # CloudLinux release 7.1+ # VirtuozzoLinux release 7.0 os_CODENAME=""- for r in "Red Hat" CentOS Fedora XenServer CloudLinux; do+ for r in "Red Hat" CentOS Fedora XenServer CloudLinux VirtuozzoLinux; do os_VENDOR=$r if [[ -n "`grep \"$r\" /etc/redhat-release`" ]]; then ver=`sed -e 's/^.* \([0-9].*\) (\(.*\)).*$/\1\|\2/' /etc/redhat-release`@@ -446,7 +447,8 @@ function is_fedora {  [ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \ [ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "OracleLinux" ] || \- [ "$os_VENDOR" = "CloudLinux" ] || [ "$os_VENDOR" = "kvmibm" ]+ [ "$os_VENDOR" = "CloudLinux" ] || [ "$os_VENDOR" = "kvmibm" ] ||+ [ "$os_VENDOR" = "VirtuozzoLinux" ] }</pre> <!--T:19-->Create local.conf file:  <!--T:20-->$ cat > ~stack/devstack/local.conf << _EOF <nowiki>[[local|localrc]]</nowiki> 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/stacksetup_devstack_for_vz7.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 <!--T:21-->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:  <!--T:22-->$ 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 <!--T:23-->Define the following function: function apply_cherry_pick { local git_remote=$1 local dest_dir=$2 local cherry_pick_refs=$3 pushd . cd $dest_dir # modify current source for ref in ${cherry_pick_refs//,/ }; do echo "Applying $ref from $git_remote ..." git fetch $git_remote $ref git cherry-pick FETCH_HEAD echo "Applying $ref from $git_remote ... done" done popd } <!--T:24-->Clone nova repository and apply pending changes: $ su stack $ cd ~ $ source ~stack/devstack/functions $ NOVA_CHERRY_PICK_REFS=refs/changes/57/182257/36,refs/changes/79/217679/12,refs/changes/36/260636/4,refs/changes/14/214314/3 $ git_clone https://github.com/openstack/nova.git ~stack/nova master $ apply_cherry_pick https://review.openstack.org/openstack/nova ~stack/nova $NOVA_CHERRY_PICK_REFS <!--T:25-->Start devstack:  <!--T:26-->$ su stack $ ~/devstack/stack.sh <!--T:27-->After script finishes, setup your iptables rules to allow incoming http trafic if you want to use OpenStack dashboard. For instance:  <!--T:28-->$ iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited $ iptables -A INPUT -p tcp --dport http -j ACCEPT $ iptables -A INPUT -j REJECT --reject-with icmp-host-prohibitedPASSWORD
<!--T:39-->
74
edits

Navigation menu