Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. groupadd horizon
  2. mkdir -p /opt/stack/horizon/openstack_dashboard/local
  3. useradd -g horizon -G stack -d /opt/stack/horizon -M horizon
  4.  
  5. cd /opt/stack/newton/horizon-* && tar -cf - . | ( cd /opt/stack/horizon && tar xf - )
  6.  
  7. cp /opt/stack/horizon/openstack_dashboard/local/local_settings.py.example /opt/stack/horizon/openstack_dashboard/local/local_settings.py
  8.  
  9. echo "ALLOWED_HOSTS = ['*', ]" >> /opt/stack/horizon/openstack_dashboard/local/local_settings.py
  10. echo 'OPENSTACK_API_VERSIONS = { "identity": 3, "image": 2, "volume": 2, }' >> /opt/stack/horizon/openstack_dashboard/local/local_settings.py
  11. echo 'OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"' >> /opt/stack/horizon/openstack_dashboard/local/local_settings.py
  12. echo 'OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False' >> /opt/stack/horizon/openstack_dashboard/local/local_settings.py
  13. echo "AVAILABLE_THEMES = [('default', 'Default', 'themes/default'),]" >> /opt/stack/horizon/openstack_dashboard/local/local_settings.py
  14.  
  15. sed -i "s/OPENSTACK_HOST = \"127.0.0.1\"/OPENSTACK_HOST = \"10.1.1.1\"/" /opt/stack/horizon/openstack_dashboard/local/local_settings.py
  16. sed -i 's/OPENSTACK_KEYSTONE_URL = "http:\/\/%s:5000\/v2.0" % OPENSTACK_HOST/OPENSTACK_KEYSTONE_URL = "http:\/\/%s:5000\/v3" % OPENSTACK_HOST/' /opt/stack/horizon/openstack_dashboard/local/local_settings.py
  17.  
  18. mkdir -p /usr/share/javascript/angular
  19. mkdir -p /usr/share/javascript/angular_smart_table
  20. curl https://github.com/angular/bower-angular-cookies/blob/master/angular-cookies.js --output /usr/share/javascript/angular/angular-cookies.js
  21. curl https://github.com/angular/bower-angular-sanitize/blob/master/angular-sanitize.js --output /usr/share/javascript/angular/angular-sanitize.js
  22. curl https://github.com/angular/bower-angular-route/blob/master/angular-route.js --output /usr/share/javascript/angular/angular-route.js
  23. curl https://github.com/lorenzofox3/Smart-Table/blob/master/dist/smart-table.min.js --output /usr/share/javascript/angular_smart_table/smart-table.min.js
  24.  
  25. cd /opt/stack/horizon && ./manage.py compress --force
  26. cd /opt/stack/horizon && echo yes | ./manage.py collectstatic
  27. cd /opt/stack/horizon && /opt/stack/horizon/manage.py make_web_conf --wsgi --force
  28. cd /opt/stack/horizon && /opt/stack/horizon/manage.py make_web_conf --apache > /etc/httpd/conf.d/horizon.conf && sed -i 's/Server.*//g' /etc/httpd/conf.d/horizon.conf
  29.  
  30. chown -R apache:apache /opt/stack/horizon/*
  31. chown horizon:stack /opt/stack/horizon
  32.  
  33. systemctl enable httpd
  34. systemctl start httpd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement