Commit graph

160 commits

Author SHA1 Message Date
Scott Moser
f9da508122 move setting variables and run-as-stack-user code
Change the over all flow so that the default settings are
filled in in the outside shell (not inside the '()' and 'tee').

This way, those variables pass through to the subshell, but they're
also available in the parent shell at the end for outputting status.

Also, exit failure rather than success if 'exec' to run as stack
user failed.
2011-10-12 08:52:09 -04:00
Scott Moser
8ab1ade42e instead of 'newgrp' and a pipe, use 'sg'
sg and newgrp basically do the same thing, but sg takes a command to
execute rather than just executing sh. This just seems cleaner.
2011-10-12 08:52:09 -04:00
Scott Moser
b94f4bf35b move 'how to use cloud' info outside of xtrace
make the successful run output end with more clear messages.
By moving them outside of the "do it all" path, the xtrace output
will not mix with echo statements.
2011-10-12 08:52:09 -04:00
Scott Moser
d67a18bb07 make sure apt-get update is run
Previously, the only path that would only ensure that 'apt-get update'
was run was when the stack user was created.

Archives can be out of date, apt-get should be run.
2011-10-12 08:52:09 -04:00
Scott Moser
0d2145a0f3 some improvements to 'create stack user' path
* Increase the timeout from 3 to 10, so user has a bigger chance
  to kill the script if being run interactively before a 'stack'
  user is created.
* explicitly ask 'getent' for the stack user rather than getting
  all users and grepping (which would match an "openstack" user,
  or a user named "bob.stack")
* use $PWD rather than `pwd`
* create file in sudoers.d rather than modifying /etc/sudoers.
2011-10-12 08:52:09 -04:00
Scott Moser
7c481189bd log output of stack.sh to logfile in current dir
use the variable LOGFILE to log stack.sh output for debugging
2011-10-12 08:41:17 -04:00
Scott Moser
c4e47ab858 simplify script duration output
Bash contains a variable 'SECONDS' that indicates how long
the current shell has been alive.  It seems sane to just use that
to indicate to the user how long the script took.
2011-10-12 08:39:44 -04:00
James E. Blair
74c084cd1c Add option not to run bash after execing stack.sh
If stack.sh is run as root, it execs stack.sh as stack, but also
runs bash after doing so to provide a prompt as the stack user.

In unattended installations this isn't desired as it will prevent
the original job from completing.

This change adds a paremeter "SHELL_AFTER_RUN" which can be set
to "no" to prevent the final invocation of bash.
2011-10-10 08:06:14 -05:00
Jesse Andrews
461bfdc89f delete instances needs sudo 2011-10-09 17:50:38 -07:00
Jesse Andrews
e4304238c2 only mount cgroups if you haven't already 2011-10-07 10:34:32 -04:00
Anthony Young
1c598da608 call novnc with flagfile 2011-10-05 08:07:53 -07:00
Anthony Young
f2aee71a2a use 10 bytes for dash password, as the UI truncates at 20 characters 2011-10-04 13:32:45 -07:00
Anthony Young
06b7ad7c05 don't require uuidgen, as it isn't always in sparse natty installs 2011-10-04 13:30:19 -07:00
Jesse Andrews
0031df019d spacing fixes 2011-10-03 23:10:55 -04:00
Jesse Andrews
2abbdd4751 fix comparisons 2011-10-03 22:48:30 -04:00
Jesse Andrews
5372f43387 update readmes 2011-10-03 01:08:24 -04:00
Jesse Andrews
85d9be3a79 document images upload 2011-10-03 00:01:28 -04:00
Jesse Andrews
08e8b74588 add uec-natty 2011-10-02 23:42:56 -04:00
Jesse Andrews
a5e5f2a680 attempt to get the id from glance redux 2011-10-02 21:07:08 -04:00
Andy Smith
2ff3f59e5b TODO: fix parsing of glance results 2011-10-02 21:05:01 -03:00
Jesse Andrews
014e9130db fix grabbing kernel/ramdisk 2011-10-02 19:23:22 -04:00
Jesse Andrews
644b8e831c more documentation and attempt to fix glance add 2011-10-02 17:50:41 -04:00
Jesse Andrews
cbe98d5663 more documentation 2011-10-02 17:47:32 -04:00
Jesse Andrews
782b99176c update docs 2011-10-02 16:53:21 -04:00
Jesse Andrews
0e7e897b48 simple docs 2011-10-02 16:36:54 -04:00
Jesse Andrews
53ed387de4 don't use guest for rabbitmq password - fixes #41 2011-10-02 14:28:17 -04:00
Jesse Andrews
89358afe35 don't use secrete as admin password - fixes #34 2011-10-02 14:11:17 -04:00
Jesse Andrews
c315ebfde6 append to fstab correctly 2011-10-02 13:25:33 -04:00
Jesse Andrews
8cfd8b6cf2 apt-get needs sudo'd 2011-10-02 13:17:31 -04:00
Jesse Andrews
c6d3042e06 attempt to get lxc working #23 2011-10-02 13:11:28 -04:00
Jesse Andrews
9b6741e7ec remove nixon & munin 2011-10-02 10:01:00 -07:00
Jesse Andrews
fa418f66a8 fixes #39 - use openssl to generate passwd for mysql 2011-10-02 09:31:34 -07:00
Jesse Andrews
9f20f5140e set service token in keystone's paste config for nova 2011-10-02 09:18:03 -07:00
Jesse Andrews
b96871e486 don't use the same keystone admin token for everything 2011-10-02 09:02:46 -07:00
Jesse Andrews
6e9fae0d27 fixing stack's passwdless sudo 2011-10-02 08:48:34 -07:00
Vishvananda Ishaya
cd10164381 Make a stack user. Fixes #35 2011-10-01 00:37:27 -07:00
Vishvananda Ishaya
c9e3fff73a autocreate a stack user if you are root instead of failing 2011-09-29 10:48:49 -07:00
termie
523c405f06 add elapsed time to script 2011-09-28 19:49:40 -05:00
termie
197d53d32e small docs updates about localrc 2011-09-28 17:18:23 -07:00
Jesse Andrews
d462295368 make sure user isn't running as root 2011-09-28 14:08:36 -07:00
Anthony Young
ba89a26e4f remove old comment 2011-09-27 19:01:08 -07:00
Anthony Young
0383b4a29e Merge remote-tracking branch 'origin/master' into nova-vncproxy-redux 2011-09-27 18:58:36 -07:00
Jesse Andrews
8f3e28cec1 use the current user instead of stack for dash 2011-09-27 18:26:27 -07:00
Anthony Young
527e341b74 changes to support the new nova-vnc wsproxy 2011-09-27 15:05:37 -07:00
Anthony Young
34acee3699 latest keystone configuration for python-novaclient and dash 2011-09-27 00:12:52 -07:00
Anthony Young
124b0c253d fix apache config to suck less - don't require chown www-data 2011-09-26 23:42:46 -07:00
Anthony Young
e8fed48ead use /opt/stack instead of /opt 2011-09-26 19:50:43 -07:00
sleepsonthefloor
9563361cf4 Merge pull request #15 from cloudbuilders/stackrc
implement stackrc for variable configuration (esp repos)
2011-09-26 15:48:49 -07:00
Anthony Young
d8c259af5a use stackrc.example, and prompt user before copying 2011-09-26 14:04:13 -07:00
Anthony Young
303233e2f5 tweaks to comments and cache organization 2011-09-26 13:12:57 -07:00