File: common_prerequisites.rst

package info (click to toggle)
watcher 14.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,764 kB
  • sloc: python: 48,904; xml: 312; sh: 265; makefile: 75
file content (139 lines) | stat: -rw-r--r-- 5,458 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Prerequisites
-------------

Before you install and configure the Infrastructure Optimization service,
you must create a database, service credentials, and API endpoints.

1. Create the database, complete these steps:

   * Use the database access client to connect to the database
     server as the ``root`` user:

     .. code-block:: console

        # mysql

   * Create the ``watcher`` database:

     .. code-block:: console

        CREATE DATABASE watcher CHARACTER SET utf8;

   * Grant proper access to the ``watcher`` database:

     .. code-block:: console

        GRANT ALL PRIVILEGES ON watcher.* TO 'watcher'@'localhost' \
          IDENTIFIED BY 'WATCHER_DBPASS';
        GRANT ALL PRIVILEGES ON watcher.* TO 'watcher'@'%' \
          IDENTIFIED BY 'WATCHER_DBPASS';

     Replace ``WATCHER_DBPASS`` with a suitable password.

   * Exit the database access client.

     .. code-block:: console

        exit;

2. Source the ``admin`` credentials to gain access to
   admin-only CLI commands:

   .. code-block:: console

      $ . admin-openrc

3. To create the service credentials, complete these steps:

   * Create the ``watcher`` user:

     .. code-block:: console

        $ openstack user create --domain default --password-prompt watcher
          User Password:
          Repeat User Password:
          +---------------------+----------------------------------+
          | Field               | Value                            |
          +---------------------+----------------------------------+
          | domain_id           | default                          |
          | enabled             | True                             |
          | id                  | b18ee38e06034b748141beda8fc8bfad |
          | name                | watcher                          |
          | options             | {}                               |
          | password_expires_at | None                             |
          +---------------------+----------------------------------+


   * Add the ``admin`` role to the ``watcher`` user:

     .. code-block:: console

        $ openstack role add --project service --user watcher admin

     .. note::

        This command produces no output.

   * Create the watcher service entities:

     .. code-block:: console

        $ openstack service create --name watcher --description "Infrastructure Optimization" infra-optim
          +-------------+----------------------------------+
          | Field       | Value                            |
          +-------------+----------------------------------+
          | description | Infrastructure Optimization      |
          | enabled     | True                             |
          | id          | d854f6fff0a64f77bda8003c8dedfada |
          | name        | watcher                          |
          | type        | infra-optim                      |
          +-------------+----------------------------------+


4. Create the Infrastructure Optimization service API endpoints:

   .. code-block:: console

      $ openstack endpoint create --region RegionOne \
        infra-optim public http://controller:9322
        +-------------+----------------------------------+
        | Field       | Value                            |
        +-------------+----------------------------------+
        | description | Infrastructure Optimization      |
        | enabled     | True                             |
        | id          | d854f6fff0a64f77bda8003c8dedfada |
        | name        | watcher                          |
        | type        | infra-optim                      |
        +-------------+----------------------------------+

      $ openstack endpoint create --region RegionOne \
        infra-optim internal http://controller:9322
        +--------------+----------------------------------+
        | Field        | Value                            |
        +--------------+----------------------------------+
        | enabled      | True                             |
        | id           | 225aef8465ef4df48a341aaaf2b0a390 |
        | interface    | internal                         |
        | region       | RegionOne                        |
        | region_id    | RegionOne                        |
        | service_id   | d854f6fff0a64f77bda8003c8dedfada |
        | service_name | watcher                          |
        | service_type | infra-optim                      |
        | url          | http://controller:9322           |
        +--------------+----------------------------------+

      $ openstack endpoint create --region RegionOne \
        infra-optim admin http://controller:9322
        +--------------+----------------------------------+
        | Field        | Value                            |
        +--------------+----------------------------------+
        | enabled      | True                             |
        | id           | 375eb5057fb546edbdf3ee4866179672 |
        | interface    | admin                            |
        | region       | RegionOne                        |
        | region_id    | RegionOne                        |
        | service_id   | d854f6fff0a64f77bda8003c8dedfada |
        | service_name | watcher                          |
        | service_type | infra-optim                      |
        | url          | http://controller:9322           |
        +--------------+----------------------------------+