
Training labs parser will allow us to automatically parse RST code to BASH. This BASH code in turn will be invoked by install-guides for validating the install guides. To provide the correct information to the parser for generating BASH code, there are a few changes required to the RST syntax. Introduces the following changes to RST syntax: - `.. end` This tag provides information for the parser to stop extracting the given block which could be code, file injection or configuration file edit. - `.. endonly` This tag provides information for the parser with the correct distro-switch logic for identifying distro-specific code. For .. only:: tags, it is better to avoid nesting. If nesting is not avoidable then it is preferable to add the .. endonly tag to close the outer block immediately. - Extra new lines in code-blocks Some commands in the code-blocks provides the expected output of the given command. This is not a BASH command which we want to run but rather some visual niceness for the users. These new lines provides the parser information to identify the end of the command. This basic logic would be something similar to find '\r\n' which at least for python means new empty line. - `mysql>` Introducing this operator for mysql commands. This could potentially be changed to `pgsql>` or similar for other SQL type databases. This allows the parser to identify mysql commands and then run them in mysql instead of in 'sh' or 'bash'. - `.. path` Introducing this tag to provide the parser with the information with the path of the configuration file. Using the description text for the same is not reliable since the description text may not be consistent. This commit should ideally introduce all the syntax changes required for the parser to convert the code-blocks in here to BASH code. These changes should have no impact on the HTML output of the RST code. Change-Id: I47830b1bc61c8b1a0f3350932d15aa3ce88fa672
3.7 KiB
Create a domain, projects, users, and roles
The Identity service provides authentication services for each
OpenStack service. The authentication service uses a combination of
domains
<domain>
, projects<project>
, users<user>
, and roles<role>
.
This guide uses a service project that contains a unique user for each service that you add to your environment. Create the
service
project:$ openstack project create --domain default \ --description "Service Project" service +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Service Project | | domain_id | e0353a670a9e496da891347c589539e9 | | enabled | True | | id | 894cdfa366d34e9d835d3de01e752262 | | is_domain | False | | name | service | | parent_id | e0353a670a9e496da891347c589539e9 | +-------------+----------------------------------+
Regular (non-admin) tasks should use an unprivileged project and user. As an example, this guide creates the
demo
project and user.Create the
demo
project:$ openstack project create --domain default \ --description "Demo Project" demo +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Demo Project | | domain_id | e0353a670a9e496da891347c589539e9 | | enabled | True | | id | ed0b60bf607743088218b0a533d5943f | | is_domain | False | | name | demo | | parent_id | e0353a670a9e496da891347c589539e9 | +-------------+----------------------------------+
Note
Do not repeat this step when creating additional users for this project.
Create the
demo
user:$ openstack user create --domain default \ --password-prompt demo User Password: Repeat User Password: +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | e0353a670a9e496da891347c589539e9 | | enabled | True | | id | 58126687cbcc4888bfa9ab73a2256f27 | | name | demo | +-----------+----------------------------------+
Create the
user
role:$ openstack role create user +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | None | | id | 997ce8d05fc143ac97d83fdfb5998552 | | name | user | +-----------+----------------------------------+
Add the
user
role to thedemo
project and user:$ openstack role add --project demo --user demo user
Note
This command provides no output.
Note
You can repeat this procedure to create additional projects and users.