Permalink
Browse files

Merge branch 'master' of https://github.com/managedit/openstack-setup

  • Loading branch information...
2 parents 3f26a97 + 3028570 commit 07603e0fe9ed875f3369ab090fa8ea81cac90b90 @kiall kiall committed Mar 2, 2012
Showing with 48 additions and 43 deletions.
  1. +11 −4 README.md
  2. +0 −11 glance-api.conf.tmpl
  3. +1 −3 glance-registry.conf.tmpl
  4. +1 −2 glance-test.sh
  5. +4 −0 glance-upload-lucid.sh
  6. +7 −7 glance.sh
  7. +1 −1 keystone_data.sh.tmpl
  8. +2 −8 nova-compute.sh
  9. +1 −0 nova-controller.sh
  10. +2 −2 nova.conf.tmpl
  11. +3 −3 openrc.tmpl
  12. +15 −2 settings
View
@@ -2,20 +2,27 @@
These scripts install+setup OpenStack (an all in one server, or all bar compute + compute nodes).
-**This only suports VLAN networking where each server has 2x network cards**
-It could be changed for others, but out of the box, thats what it does.
+# Assumptions:
-NOTE: These scripts do NOT secure your setup. Every service connects to MySQL as root, The default RabbitMQ account is used etc. Is is **your** job to handle that kind of stuff after you have a quick and dirty, but working install done.
+1. You want to use the VLAN network manager. (NOTE: The requires VLAN capable switches!)
+2. You want to use multi-node networking (NOTE: This is *very* different to simply having multiple compute nodes. Read up on it.)
+3. You want to use 2 network cards in every server (1 for public traffic, 1 for nova's internal traffic)
+4. You are installing on 100% clean Ubuntu 11.10 servers (i.e. you have *never* attempted to install OpenStack on these servers since the last time they were wiped)
+If these assumptions are not valid for your setup, these scripts will not work and have not been tested. They could be changed for others, but out of the box, that is simply what they do.
+
+NOTE: These scripts do NOT secure your setup. eg the default RabbitMQ "guest" account is used etc. Is is **your** job to handle that kind of stuff after you have a quick and dirty, but working install done.
# All in one server (You can add more later...)
+Instructions:
+
1. Install ubuntu 11.10
2. Setup /etc/network/interfaces (See sample below)
3. Login as root
4. Install git (apt-get install git)
5. Clone scripts (git clone https://github.com/managedit/openstack-setup.git)
-6. Edit "settings" to suit.. (or create settings.local with overrides)
+6. Edit "settings" to suit.. (or better yet, create settings.local and copy the settings you want to change in there.)
7. Run: ./all-in-one.sh
8. ...
9. Profit!
View
@@ -131,21 +131,10 @@ image_cache_stall_timeout = 86400
# Turn on/off delayed delete
delayed_delete = False
-# Delayed delete time in seconds
-scrub_time = 43200
-
-# Directory that the scrubber will use to remind itself of what to delete
-# Make sure this is also set in glance-scrubber.conf
-scrubber_datadir = /var/lib/glance/scrubber
-
[pipeline:glance-api]
-#pipeline = versionnegotiation context apiv1app
-# NOTE: use the following pipeline for keystone
pipeline = versionnegotiation authtoken context apiv1app
# To enable Image Cache Management API replace pipeline with below:
-# pipeline = versionnegotiation context imagecache apiv1app
-# NOTE: use the following pipeline for keystone auth (with caching)
# pipeline = versionnegotiation authtoken context imagecache apiv1app
[pipeline:versions]
@@ -3,7 +3,7 @@
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
-debug = True
+debug = False
# Address to bind the registry server
bind_host = 0.0.0.0
@@ -44,8 +44,6 @@ api_limit_max = 1000
limit_param_default = 25
[pipeline:glance-registry]
-#pipeline = context registryapp
-# NOTE: use the following pipeline for keystone
pipeline = authtoken keystone_shim context registryapp
[app:registryapp]
View
@@ -2,5 +2,4 @@
# Import Settings
. settings
-glance -A $SERVICE_TOKEN show 2
-(glance -A $SERVICE_TOKEN index && echo "Success" ) || echo "Failed"
+glance -A $SERVICE_TOKEN index || echo "Failed"
@@ -3,6 +3,10 @@
# Import Settings
. settings
+echo "Use glance-upload-loader.sh followed by glance-upload-lucid-loader.sh instead"
+
+exit 1
+
if [ ! -f "lucid-server-cloudimg-amd64.tar.gz" ] ; then
echo "Downloading image"
wget http://cloud-images.ubuntu.com/lucid/current/lucid-server-cloudimg-amd64.tar.gz
View
@@ -16,21 +16,21 @@ sed -e "s,%MYSQL_HOST%,$MYSQL_HOST,g" -i glance-registry.conf
sed -e "s,%MYSQL_GLANCE_PASS%,$MYSQL_GLANCE_PASS,g" -i glance-registry.conf
sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" glance-api.conf.tmpl > glance-api.conf
+service glance-api stop
+service glance-registry stop
+
+sleep 2
+
cp glance-registry.conf glance-api.conf /etc/glance/
chown glance:glance /etc/glance/glance-registry.conf
chown glance:glance /etc/glance/glance-api.conf
-service glance-api restart
-sleep 2
-service glance-registry restart
-sleep 2
-
glance-manage db_sync
-service glance-api restart
+service glance-api start
sleep 2
-service glance-registry restart
+service glance-registry start
sleep 2
./glance-upload-ttylinux.sh
@@ -23,7 +23,7 @@ keystone-manage service add keystone identity "Keystone Identity Service"
#endpointTemplates
keystone-manage endpointTemplates add %REGION% nova http://%HOST_IP%:8774/v1.1/%tenant_id% http://%HOST_IP%:8774/v1.1/%tenant_id% http://%HOST_IP%:8774/v1.1/%tenant_id% 1 1
-keystone-manage endpointTemplates add %REGION% glance http://%HOST_IP%:9292/v1.1/%tenant_id% http://%HOST_IP%:9292/v1.1/%tenant_id% http://%HOST_IP%:9292/v1.1/%tenant_id% 1 1
+keystone-manage endpointTemplates add %REGION% glance http://%HOST_IP%:9292/v1 http://%HOST_IP%:9292/v1 http://%HOST_IP%:9292/v1 1 1
keystone-manage endpointTemplates add %REGION% keystone http://%HOST_IP%:5000/v2.0 http://%HOST_IP%:35357/v2.0 http://%HOST_IP%:5000/v2.0 1 1
# keystone-manage endpointTemplates add %REGION% swift http://%HOST_IP%:8080/v1/AUTH_%tenant_id% http://%HOST_IP%:8080/ http://%HOST_IP%:8080/v1/AUTH_%tenant_id% 1 1
View
@@ -3,7 +3,7 @@
# Settings
. settings
-apt-get install -y nova-api nova-compute nova-network python-keystone python-mysqldb mysql-client curl dnsmasq bridge-utils
+apt-get install -y nova-api nova-compute nova-network python-keystone python-mysqldb mysql-client curl
# Nova Setup
sed -e "s,999888777666,$SERVICE_TOKEN,g" api-paste-keystone.ini.tmpl > api-paste-keystone.ini
@@ -18,13 +18,7 @@ sed -e "s,%MYSQL_NOVA_PASS%,$MYSQL_NOVA_PASS,g" -i nova.conf
sed -e "s,%FIXED_RANGE_MASK%,$FIXED_RANGE_MASK,g" -i nova.conf
sed -e "s,%FIXED_RANGE_NET%,$FIXED_RANGE_NET,g" -i nova.conf
sed -e "s,%FIXED_RANGE%,$FIXED_RANGE,g" -i nova.conf
-
-# Fix dnsmasq
-sed -e "s,ENABLED=1,ENABLED=0,g" -i /etc/default/dnsmasq
-
-killall dnsmasq
-sleep 1
-killall -9 dnsmasq
+sed -e "s,%LIBVIRT_TYPE%,$LIBVIRT_TYPE,g" -i nova.conf
cp nova.conf api-paste-keystone.ini /etc/nova/
chown nova:nova /etc/nova/nova.conf /etc/nova/api-paste-keystone.ini
View
@@ -22,6 +22,7 @@ sed -e "s,%MYSQL_NOVA_PASS%,$MYSQL_NOVA_PASS,g" -i nova.conf
sed -e "s,%FIXED_RANGE_MASK%,$FIXED_RANGE_MASK,g" -i nova.conf
sed -e "s,%FIXED_RANGE_NET%,$FIXED_RANGE_NET,g" -i nova.conf
sed -e "s,%FIXED_RANGE%,$FIXED_RANGE,g" -i nova.conf
+sed -e "s,%LIBVIRT_TYPE%,$LIBVIRT_TYPE,g" -i nova.conf
cp nova.conf api-paste-keystone.ini /etc/nova/
View
@@ -4,7 +4,6 @@
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--force_dhcp_release=True
---use_deprecated_auth
--verbose
--sql_connection=mysql://nova:%MYSQL_NOVA_PASS%@%MYSQL_HOST%/nova
--public_interface=%PUBLIC_INTERFACE%
@@ -19,7 +18,6 @@
--vncproxy_url=http://%HOST_IP%:6080
--ajax_console_proxy_url=http://%HOST_IP%:8000
--glance_api_servers=%HOST_IP%:9292
---ec2_dmz_host=%HOST_IP%
--s3_dmz=%HOST_IP%
--ec2_host=%HOST_IP%
--s3_host=%HOST_IP%
@@ -30,3 +28,5 @@
--fixed_range=%FIXED_RANGE%
--keystone_ec2_url=http://%HOST_IP%:5000/v2.0/ec2tokens
--multi_host=True
+--send_arp_for_ha=True
+--libvirt_type=%LIBVIRT_TYPE%
View
@@ -2,9 +2,9 @@ NOVA_API_HOST=%HOST_IP%
GLANCE_API_HOST=%HOST_IP%
KEYSTONE_API_HOST=%HOST_IP%
-KEYSTONE_TENANT="admin"
-KEYSTONE_USERNAME="admin"
-KEYSTONE_PASSWORD="password"
+KEYSTONE_TENANT="%TENANT%"
+KEYSTONE_USERNAME="%USERNAME%"
+KEYSTONE_PASSWORD="%PASSWORD%"
NOVA_REGION="%REGION%"
View
@@ -3,10 +3,13 @@
# from there, allowing you to `git pull` without conflicts! #
#####################################################################
+# General Settings
+LIBVIRT_TYPE=${LIBVIRT_TYPE:-kvm} # Currently supports kvm or qemu
+
# MySQL Server Settings
MYSQL_HOST="127.0.0.1"
MYSQL_ROOT_PASS="letmein"
-MYSQL_NOVA_PSSS="letmeinN"
+MYSQL_NOVA_PASS="letmeinN"
MYSQL_GLANCE_PASS="letmeinG"
MYSQL_KEYSTONE_PASS="letmeinK"
MYSQL_HORIZON_PASS="letmeinH"
@@ -26,7 +29,7 @@ FIXED_RANGE_NET="172.16.0.0"
FIXED_RANGE_BITS="12"
FIXED_RANGE_MASK="255.240.0.0"
FIXED_RANGE_NETWORK_SIZE="256"
-FIXED_RANGE_NETWROK_COUNT="16"
+FIXED_RANGE_NETWORK_COUNT="16"
# Misc
REGION="nova" # Region name - "nova" is the default, and probably the most reliable withoit extra setup!
@@ -37,6 +40,16 @@ then
. settings.local
fi
+# Check for kvm (hardware based virtualization). If unable to initialize
+# kvm, we drop back to the slower emulation mode (qemu). Note: many systems
+# come with hardware virtualization disabled in BIOS.
+if [[ "$LIBVIRT_TYPE" == "kvm" ]]; then
+ modprobe kvm || true
+ if [ ! -e /dev/kvm ]; then
+ LIBVIRT_TYPE=qemu
+ fi
+fi
+
# Dont change anything below here!
FIXED_RANGE="${FIXED_RANGE_NET}/${FIXED_RANGE_BITS}"
export NOVA_PROJECT_ID="admin" # Tenant

0 comments on commit 07603e0

Please sign in to comment.