...
 
Commits (3)
......@@ -446,15 +446,20 @@ passwdHelp = "Your OpenStack admin and instance VM password is randomly-generate
### pass
passwdHelp += " When logging in to the Dashboard, use the `admin` user; when logging into instance VMs, use the `ubuntu` user. If you have selected Mitaka or newer, use 'default' as the Domain at the login prompt."
grafanaInstructions = ""
if params.release in [ "pike","queens","rocky" ]:
grafanaInstructions = "You can also login to [your experiment's Grafana WWW interface](http://{host-%s}:3000/dashboard/db/openstack-instance-statistics?orgId=1) and view OpenStack statistics once you've created some VMs." % (params.controllerHost)
tourInstructions = \
"""
### Basic Instructions
Once your experiment nodes have booted, and this profile's configuration scripts have finished configuring OpenStack inside your experiment, you'll be able to visit [the OpenStack Dashboard WWW interface](http://{host-%s}/horizon/auth/login/?next=/horizon/project/instances/) (approx. 5-15 minutes). If you've selected the Pike release (or newer), you can also login to [your experiment's Grafana WWW interface](http://{host-%s}:3000/dashboard/db/openstack-instance-statistics?orgId=1) and view OpenStack instance VM statistics once you've created some VMs. %s
Once your experiment nodes have booted, and this profile's configuration scripts have finished configuring OpenStack inside your experiment, you'll be able to visit [the OpenStack Dashboard WWW interface](http://{host-%s}/horizon/auth/login/?next=/horizon/project/instances/) (approx. 5-15 minutes). %s %s
Please wait to login to the OpenStack dashboard until the setup scripts have completed (we've seen Dashboard issues with content not appearing if you login before configuration is complete). There are multiple ways to determine if the scripts have finished:
- First, you can watch the experiment status page: the overall State will say \"booted (startup services are still running)\" to indicate that the nodes have booted up, but the setup scripts are still running.
- Second, the Topology View will show you, for each node, the status of the startup command on each node (the startup command kicks off the setup scripts on each node). Once the startup command has finished on each node, the overall State field will change to \"ready\". If any of the startup scripts fail, you can mouse over the failed node in the topology viewer for the status code.
- Finally, the profile configuration scripts also send you two emails: once to notify you that controller setup has started, and a second to notify you that setup has completed. Once you receive the second email, you can login to the Openstack Dashboard and begin your work.
- Third, the profile configuration scripts also send you two emails: once to notify you that controller setup has started, and a second to notify you that setup has completed. Once you receive the second email, you can login to the Openstack Dashboard and begin your work.
- Finally, you can view [the profile setup script logfiles](http://{host-%s}:7999/) as the setup scripts run. Use the `admin` username and the random password above.
**NOTE:** If the web interface rejects your password or gives another error, the scripts might simply need more time to set up the backend. Wait a few minutes and try again. If you don't receive any email notifications, you can SSH to the 'ctl' node, become root, and check the primary setup script's logfile (/root/setup/setup-controller.log). If near the bottom there's a line that includes 'Your OpenStack instance has completed setup'), the scripts have finished, and it's safe to login to the Dashboard.
......@@ -467,7 +472,7 @@ The profile's setup scripts are automatically installed on each node in `/tmp/se
### Detailed Parameter Documentation
%s
""" % (params.controllerHost,params.controllerHost,passwdHelp,detailedParamAutoDocs)
""" % (params.controllerHost,grafanaInstructions,passwdHelp,params.controllerHost,detailedParamAutoDocs)
#
# Setup the Tour info with the above description and instructions.
......
......@@ -2755,7 +2755,7 @@ if [ -z "${HEAT_DBPASS}" ]; then
--publicurl http://$CONTROLLER:8000/v1 \
--internalurl http://$CONTROLLER:8000/v1 \
--adminurl http://$CONTROLLER:8000/v1 \
--region RegionOne \
--region $REGION \
cloudformation
else
__openstack endpoint create --region $REGION \
......@@ -4098,7 +4098,7 @@ if [ -z "${SAHARA_DBPASS}" ]; then
keystone user-create --name sahara --pass $SAHARA_PASS
keystone user-role-add --user sahara --tenant service --role admin
keystone service-create --name sahara --type data_processing \
keystone service-create --name sahara --type data-processing \
--description "OpenStack Data Processing Service"
keystone endpoint-create \
--service-id $(keystone service-list | awk '/ sahara / {print $2}') \
......@@ -4110,7 +4110,7 @@ if [ -z "${SAHARA_DBPASS}" ]; then
__openstack user create $DOMARG --password $SAHARA_PASS sahara
__openstack role add --user sahara --project service admin
__openstack service create --name sahara \
--description "OpenStack Data Processing Service" data_processing
--description "OpenStack Data Processing Service" data-processing
if [ $KEYSTONEAPIVERSION -lt 3 ]; then
__openstack endpoint create \
......@@ -4118,14 +4118,14 @@ if [ -z "${SAHARA_DBPASS}" ]; then
--internalurl http://${CONTROLLER}:8386/v1.1/%\(tenant_id\)s \
--adminurl http://${CONTROLLER}:8386/v1.1/%\(tenant_id\)s \
--region $REGION \
data_processing
data-processing
else
__openstack endpoint create --region $REGION \
data_processing public http://${CONTROLLER}:8386/v1.1/%\(tenant_id\)s
data-processing public http://${CONTROLLER}:8386/v1.1/%\(project_id\)s
__openstack endpoint create --region $REGION \
data_processing internal http://${CONTROLLER}:8386/v1.1/%\(tenant_id\)s
data-processing internal http://${CONTROLLER}:8386/v1.1/%\(project_id\)s
__openstack endpoint create --region $REGION \
data_processing admin http://${CONTROLLER}:8386/v1.1/%\(tenant_id\)s
data-processing admin http://${CONTROLLER}:8386/v1.1/%\(project_id\)s
fi
fi
......@@ -4215,6 +4215,8 @@ if [ -z "${SAHARA_DBPASS}" ]; then
else
crudini --set /etc/sahara/sahara.conf keystone_authtoken \
auth_uri http://${CONTROLLER}:5000
crudini --set /etc/sahara/sahara.conf keystone_authtoken \
www_authenticate_uri http://${CONTROLLER}:5000
crudini --set /etc/sahara/sahara.conf keystone_authtoken \
auth_url http://${CONTROLLER}:${KADMINPORT}
crudini --set /etc/sahara/sahara.conf keystone_authtoken \
......@@ -4229,6 +4231,24 @@ if [ -z "${SAHARA_DBPASS}" ]; then
username sahara
crudini --set /etc/sahara/sahara.conf keystone_authtoken \
password "${SAHARA_PASS}"
crudini --set /etc/sahara/sahara.conf keystone_authtoken \
region_name $REGION
crudini --set /etc/sahara/sahara.conf keystone_authtoken \
os_region_name $REGION
crudini --set /etc/sahara/sahara.conf trustee \
auth_url http://${CONTROLLER}:${KADMINPORT}
crudini --set /etc/sahara/sahara.conf trustee \
username sahara
crudini --set /etc/sahara/sahara.conf trustee \
password ${SAHARA_PASS}
crudini --set /etc/sahara/sahara.conf trustee \
project_name admin
crudini --set /etc/sahara/sahara.conf trustee \
${PROJECT_DOMAIN_PARAM} default
crudini --set /etc/sahara/sahara.conf trustee \
${USER_DOMAIN_PARAM} default
fi
if [ $OSVERSION -ge $OSMITAKA -o $KEYSTONEUSEMEMCACHE -eq 1 ]; then
crudini --set /etc/sahara/sahara.conf keystone_authtoken \
......
......@@ -17,6 +17,46 @@ if [ -f $OURDIR/setup-driver-done ]; then
echo "setup-driver already ran; not running again"
exit 0
fi
#
# Setup nginx to show our setup/config directory.
#
if [ "$HOSTNAME" = "$CONTROLLER" ]; then
maybe_install_packages nginx
# Handle case where nginx won't start because the default site
# (which is enabled!) needs port 80, and apache might be listening
# there.
if [ ! $? -eq 0 ]; then
rm -f /etc/nginx/sites-available/default \
/etc/nginx/sites-enabled/default
maybe_install_packages nginx
fi
echo "$ADMIN_PASS" | htpasswd -n -i admin > /etc/nginx/htpasswd
chown www-data:root /etc/nginx/htpasswd
chmod 660 /etc/nginx/htpasswd
mkdir /var/www/profile-setup
chown www-data /var/www/profile-setup
mount -o bind,ro $OURDIR /var/www/profile-setup/
echo $OURDIR /var/www/profile-setup none defaults,bind 0 0 >> /etc/fstab
cat <<EOF >/etc/nginx/sites-available/profile-setup-logs
server {
include /etc/nginx/mime.types;
types { text/plain log; }
listen 7999 default_server;
listen [::]:7999 default_server;
root /var/www/profile-setup;
index index.html;
server_name _;
location / {
autoindex on;
auth_basic "profile-setup";
auth_basic_user_file /etc/nginx/htpasswd;
}
}
EOF
ln -s /etc/nginx/sites-available/profile-setup-logs \
/etc/nginx/sites-enabled/profile-setup-logs
fi
logtstart "driver"
# Copy our source code into $OURDIR for future use:
......