From 7822ef9cfd9a3feb294e29c3ad0f1e5ecfcae4d3 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Fri, 21 Mar 2014 11:50:35 +0100 Subject: [PATCH] Use a $ prompt where possible Replace # prompts with $ prompts where root privileges are not required. Change-Id: Ia7c0388e1b61d8de469d197e47cc5f95ca33bebe --- .../section_cli_glance_manage_images.xml | 2 +- .../block-storage/drivers/coraid-driver.xml | 8 +++--- .../drivers/nfs-volume-driver.xml | 2 +- .../section_ceilometer-install.xml | 8 +++--- .../section_cinder-controller.xml | 14 +++++----- doc/install-guide/section_glance-install.xml | 10 +++---- doc/install-guide/section_heat-install.xml | 14 +++++----- .../section_keystone-install.xml | 2 +- .../section_keystone-services.xml | 4 +-- .../section_neutron-controller-node.xml | 2 +- doc/install-guide/section_nova-controller.xml | 6 ++--- doc/training-guides/lab001-control-node.xml | 26 +++++++++---------- 12 files changed, 49 insertions(+), 49 deletions(-) diff --git a/doc/common/section_cli_glance_manage_images.xml b/doc/common/section_cli_glance_manage_images.xml index aa98d9dcb4..ee1975d146 100644 --- a/doc/common/section_cli_glance_manage_images.xml +++ b/doc/common/section_cli_glance_manage_images.xml @@ -258,7 +258,7 @@ To annotate an image with a property that describes the disk_bus, cdrom_bus, and vif_model: - # glance image-update \ + $ glance image-update \ --property hw_disk_bus=scsi \ --property hw_cdrom_bus=ide \ --property hw_vif_model=e1000 \ diff --git a/doc/config-reference/block-storage/drivers/coraid-driver.xml b/doc/config-reference/block-storage/drivers/coraid-driver.xml index 8a53c831ab..60af381974 100644 --- a/doc/config-reference/block-storage/drivers/coraid-driver.xml +++ b/doc/config-reference/block-storage/drivers/coraid-driver.xml @@ -123,7 +123,7 @@ Download the latest Coraid AoE driver. - # wget http://support.coraid.com/support/linux/aoeXXX.tar.gz + $ wget http://support.coraid.com/support/linux/aoeXXX.tar.gz @@ -131,8 +131,8 @@ Install the AoE driver. - # cd aoeXXX - # make + $ cd aoeXXX + $ make # make install @@ -333,7 +333,7 @@ coraid_repository_key = coraid_repository_key Create a volume. - # cinder type-create ‘volume_type_name + $ cinder type-create ‘volume_type_name where volume_type_name is the name you assign the volume. You will see output similar to the following: diff --git a/doc/config-reference/block-storage/drivers/nfs-volume-driver.xml b/doc/config-reference/block-storage/drivers/nfs-volume-driver.xml index fa065109c2..fbb8a62715 100644 --- a/doc/config-reference/block-storage/drivers/nfs-volume-driver.xml +++ b/doc/config-reference/block-storage/drivers/nfs-volume-driver.xml @@ -114,7 +114,7 @@ You can now create volumes as you normally would: - # nova volume-create --display-name=myvol 5 + $ nova volume-create --display-name=myvol 5 # ls /var/lib/cinder/nfs/46c5db75dc3a3a50a10bfd1a456a9f3f volume-a8862558-e6d6-4648-b5df-bb84f31c8935 This volume can also be attached and deleted diff --git a/doc/install-guide/section_ceilometer-install.xml b/doc/install-guide/section_ceilometer-install.xml index 1f8165fef8..770810adb3 100644 --- a/doc/install-guide/section_ceilometer-install.xml +++ b/doc/install-guide/section_ceilometer-install.xml @@ -167,8 +167,8 @@ log_dir = /var/log/ceilometer Telemetry service uses to authenticate with the Identity Service. Use the service tenant and give the user the admin role: - # keystone user-create --name=ceilometer --pass=CEILOMETER_PASS --email=ceilometer@example.com -# keystone user-role-add --user=ceilometer --tenant=service --role=admin + $ keystone user-create --name=ceilometer --pass=CEILOMETER_PASS --email=ceilometer@example.com +$ keystone user-role-add --user=ceilometer --tenant=service --role=admin Add the credentials to the configuration files for the @@ -215,9 +215,9 @@ os_password = CEILOMETER_PASS that other OpenStack services can locate it. Use the keystone command to register the service and specify the endpoint: - # keystone service-create --name=ceilometer --type=metering \ + $ keystone service-create --name=ceilometer --type=metering \ --description="Telemetry" -# keystone endpoint-create \ +$ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ metering / {print $2}') \ --publicurl=http://controller:8777 \ --internalurl=http://controller:8777 \ diff --git a/doc/install-guide/section_cinder-controller.xml b/doc/install-guide/section_cinder-controller.xml index b752a9eee0..bac83b63a2 100644 --- a/doc/install-guide/section_cinder-controller.xml +++ b/doc/install-guide/section_cinder-controller.xml @@ -58,7 +58,7 @@ connection = mysql://cinder:CINDER_DBPASS@ Use the password that you set to log in as root to create a cinder database. - # mysql -u root -p + $ mysql -u root -p mysql> CREATE DATABASE cinder; mysql> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \ IDENTIFIED BY 'CINDER_DBPASS'; @@ -75,8 +75,8 @@ IDENTIFIED BY 'CINDER_DBPASS'; Service uses this user to authenticate with the Identity Service. Use the service tenant and give the user the admin role. - # keystone user-create --name=cinder --pass=CINDER_PASS --email=cinder@example.com -# keystone user-role-add --user=cinder --tenant=service --role=admin + $ keystone user-create --name=cinder --pass=CINDER_PASS --email=cinder@example.com +$ keystone user-role-add --user=cinder --tenant=service --role=admin Add the credentials to the file @@ -136,9 +136,9 @@ rabbit_password = RABBIT_PASS Service so that other OpenStack services can locate it. Register the service and specify the endpoint using the keystone command. - # keystone service-create --name=cinder --type=volume \ + $ keystone service-create --name=cinder --type=volume \ --description="OpenStack Block Storage" -# keystone endpoint-create \ +$ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ volume / {print $2}') \ --publicurl=http://controller:8776/v1/%\(tenant_id\)s \ --internalurl=http://controller:8776/v1/%\(tenant_id\)s \ @@ -147,9 +147,9 @@ rabbit_password = RABBIT_PASS Also register a service and endpoint for version 2 of the Block Storage Service API. - # keystone service-create --name=cinderv2 --type=volumev2 \ + $ keystone service-create --name=cinderv2 --type=volumev2 \ --description="OpenStack Block Storage v2" -# keystone endpoint-create \ +$ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ volumev2 / {print $2}') \ --publicurl=http://controller:8776/v2/%\(tenant_id\)s \ --internalurl=http://controller:8776/v2/%\(tenant_id\)s \ diff --git a/doc/install-guide/section_glance-install.xml b/doc/install-guide/section_glance-install.xml index 9923db01e7..2bcb246456 100644 --- a/doc/install-guide/section_glance-install.xml +++ b/doc/install-guide/section_glance-install.xml @@ -85,7 +85,7 @@ connection = mysql://glance:GLANCE_DBPASS@controller/ Use the password you created to log in as root and create a glance database user: - # mysql -u root -p + $ mysql -u root -p mysql> CREATE DATABASE glance; mysql> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \ IDENTIFIED BY 'GLANCE_DBPASS'; @@ -103,9 +103,9 @@ IDENTIFIED BY 'GLANCE_DBPASS'; glance user. Use the service tenant and give the user the admin role. - # keystone user-create --name=glance --pass=GLANCE_PASS \ + $ keystone user-create --name=glance --pass=GLANCE_PASS \ --email=glance@example.com -# keystone user-role-add --user=glance --tenant=service --role=admin +$ keystone user-role-add --user=glance --tenant=service --role=admin Configure the Image Service to use the Identity @@ -170,9 +170,9 @@ flavor = keystone Register the Image Service with the Identity Service so that other OpenStack services can locate it. Register the service and create the endpoint: - # keystone service-create --name=glance --type=image \ + $ keystone service-create --name=glance --type=image \ --description="OpenStack Image Service" -# keystone endpoint-create \ +$ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ image / {print $2}') \ --publicurl=http://controller:9292 \ --internalurl=http://controller:9292 \ diff --git a/doc/install-guide/section_heat-install.xml b/doc/install-guide/section_heat-install.xml index b7cd98c6cc..36028efaaa 100644 --- a/doc/install-guide/section_heat-install.xml +++ b/doc/install-guide/section_heat-install.xml @@ -55,7 +55,7 @@ connection = mysql://heat:HEAT_DBPASS@controller/heat Use the password that you set previously to log in as root and create a heat database user: - # mysql -u root -p + $ mysql -u root -p mysql> CREATE DATABASE heat; mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' \ IDENTIFIED BY 'HEAT_DBPASS'; @@ -100,9 +100,9 @@ rabbit_password = RABBIT_PASS Orchestration service can use to authenticate with the Identity Service. Use the service tenant and give the user the admin role: - # keystone user-create --name=heat --pass=HEAT_PASS \ + $ keystone user-create --name=heat --pass=HEAT_PASS \ --email=heat@example.com -# keystone user-role-add --user=heat --tenant=service --role=admin +$ keystone user-role-add --user=heat --tenant=service --role=admin Edit the /etc/heat/heat.conf file to @@ -126,16 +126,16 @@ keystone_ec2_uri = http://controller:5000/v2.0/ec2tok Identity Service so that other OpenStack services can locate these APIs. Register the service and specify the endpoint: - # keystone service-create --name=heat --type=orchestration \ + $ keystone service-create --name=heat --type=orchestration \ --description="Orchestration" -# keystone endpoint-create \ +$ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ orchestration / {print $2}') \ --publicurl=http://controller:8004/v1/%\(tenant_id\)s \ --internalurl=http://controller:8004/v1/%\(tenant_id\)s \ --adminurl=http://controller:8004/v1/%\(tenant_id\)s -# keystone service-create --name=heat-cfn --type=cloudformation \ +$ keystone service-create --name=heat-cfn --type=cloudformation \ --description="Orchestration CloudFormation" -# keystone endpoint-create \ +$ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ cloudformation / {print $2}') \ --publicurl=http://controller:8000/v1 \ --internalurl=http://controller:8000/v1 \ diff --git a/doc/install-guide/section_keystone-install.xml b/doc/install-guide/section_keystone-install.xml index 356ea68e7b..4587c313c2 100644 --- a/doc/install-guide/section_keystone-install.xml +++ b/doc/install-guide/section_keystone-install.xml @@ -59,7 +59,7 @@ connection = mysql://keystone:KEYSTONE_DBPASS@Use the password that you set previously to log in as root. Create a keystone database user: - # mysql -u root -p + $ mysql -u root -p mysql> CREATE DATABASE keystone; mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \ IDENTIFIED BY 'KEYSTONE_DBPASS'; diff --git a/doc/install-guide/section_keystone-services.xml b/doc/install-guide/section_keystone-services.xml index 9ae0ace6ae..069af82816 100644 --- a/doc/install-guide/section_keystone-services.xml +++ b/doc/install-guide/section_keystone-services.xml @@ -23,7 +23,7 @@ Create a service entry for the Identity Service: - # keystone service-create --name=keystone --type=identity \ + $ keystone service-create --name=keystone --type=identity \ --description="OpenStack Identity Service" +-------------+----------------------------------+ | Property | Value | @@ -42,7 +42,7 @@ the public API, internal API, and admin API. In this guide, the controller host name is used. Note that the Identity Service uses a different port for the admin API. - # keystone endpoint-create \ + $ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ identity / {print $2}') \ --publicurl=http://controller:5000/v2.0 \ --internalurl=http://controller:5000/v2.0 \ diff --git a/doc/install-guide/section_neutron-controller-node.xml b/doc/install-guide/section_neutron-controller-node.xml index d962fdc751..7e98a94a58 100644 --- a/doc/install-guide/section_neutron-controller-node.xml +++ b/doc/install-guide/section_neutron-controller-node.xml @@ -35,7 +35,7 @@ Connect to the MySQL database as the root user, create the neutron database, and grant the proper access to it: - # mysql -u root -p + $ mysql -u root -p mysql> CREATE DATABASE neutron; mysql> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \ IDENTIFIED BY 'NEUTRON_DBPASS'; diff --git a/doc/install-guide/section_nova-controller.xml b/doc/install-guide/section_nova-controller.xml index a8624bbb7c..78cd8b66f4 100644 --- a/doc/install-guide/section_nova-controller.xml +++ b/doc/install-guide/section_nova-controller.xml @@ -90,7 +90,7 @@ rabbit_password = RABBIT_PASS Use the password you created previously to log in as root. Create a nova database user: - # mysql -u root -p + $ mysql -u root -p mysql> CREATE DATABASE nova; mysql> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \ IDENTIFIED BY 'NOVA_DBPASS'; @@ -132,8 +132,8 @@ vncserver_proxyclient_address=192.168.0.10 authenticate with the Identity Service. Use the service tenant and give the user the admin role: - # keystone user-create --name=nova --pass=NOVA_PASS --email=nova@example.com -# keystone user-role-add --user=nova --tenant=service --role=admin + $ keystone user-create --name=nova --pass=NOVA_PASS --email=nova@example.com +$ keystone user-role-add --user=nova --tenant=service --role=admin Configure Compute to use these credentials with the Identity diff --git a/doc/training-guides/lab001-control-node.xml b/doc/training-guides/lab001-control-node.xml index 9b640893f2..60598f0a9f 100644 --- a/doc/training-guides/lab001-control-node.xml +++ b/doc/training-guides/lab001-control-node.xml @@ -142,7 +142,7 @@ iface eth2 inet dhcp Create these databases: - # mysql -u root -p + $ mysql -u root -p mysql> CREATE DATABASE keystone; mysql> GRANT ALL ON keystone.* TO 'keystoneUser'@'%' IDENTIFIED BY 'keystonePass'; mysql> CREATE DATABASE glance; @@ -220,10 +220,10 @@ iface eth2 inet dhcp Run Scripts: - # chmod +x keystone_basic.sh - # chmod +x keystone_endpoints_basic.sh - # ./keystone_basic.sh - # ./keystone_endpoints_basic.sh + $ chmod +x keystone_basic.sh + $ chmod +x keystone_endpoints_basic.sh + $ ./keystone_basic.sh + $ ./keystone_endpoints_basic.sh @@ -235,22 +235,22 @@ iface eth2 inet dhcp Paste the following: - # export OS_TENANT_NAME=admin - # export OS_USERNAME=admin - # export OS_PASSWORD=admin_pass - # export OS_AUTH_URL="http://192.168.100.51:5000/v2.0/" + $ export OS_TENANT_NAME=admin + $ export OS_USERNAME=admin + $ export OS_PASSWORD=admin_pass + $ export OS_AUTH_URL="http://192.168.100.51:5000/v2.0/" Load the above credentials: - # source Crediantials.sh + $ source Crediantials.sh To test Keystone, we use a simple CLI command: - # keystone user-list + $ keystone user-list @@ -356,13 +356,13 @@ flavor = keystone To test Glance, upload the “cirros cloud image” directly from the internet: - # glance image-create --name OS4Y_Cirros --is-public true --container-format bare --disk-format qcow2 --location https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img + $ glance image-create --name OS4Y_Cirros --is-public true --container-format bare --disk-format qcow2 --location https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img Check if the image is successfully uploaded: - # glance image-list + $ glance image-list