1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,12 +0,0 @@ |
1 |
-======= |
|
2 |
-Changes |
|
3 |
-======= |
|
4 |
- |
|
5 |
-Recent Changes What's been happening? |
|
6 |
-===================================== |
|
7 |
- |
|
8 |
-These are the commits to DevStack for the last six months. For the |
|
9 |
-complete list see `the DevStack project in |
|
10 |
-Gerrit <https://review.openstack.org/#/q/status:merged+project:openstack-dev/devstack,n,z>`__. |
|
11 |
- |
|
12 |
-%GIT_LOG% |
... | ... |
@@ -62,8 +62,7 @@ appear in the file will be used. |
62 | 62 |
A specific meta-section ``local|localrc`` is used to provide a default |
63 | 63 |
``localrc`` file (actually ``.localrc.auto``). This allows all custom |
64 | 64 |
settings for DevStack to be contained in a single file. If ``localrc`` |
65 |
-exists it will be used instead to preserve backward-compatibility. More |
|
66 |
-details on the :doc:`contents of local.conf <local.conf>` are available. |
|
65 |
+exists it will be used instead to preserve backward-compatibility. |
|
67 | 66 |
|
68 | 67 |
:: |
69 | 68 |
|
... | ... |
@@ -84,6 +83,76 @@ Also note that the ``localrc`` section is sourced as a shell script |
84 | 84 |
fragment and MUST conform to the shell requirements, specifically no |
85 | 85 |
whitespace around ``=`` (equals). |
86 | 86 |
|
87 |
+openrc |
|
88 |
+====== |
|
89 |
+ |
|
90 |
+``openrc`` configures login credentials suitable for use with the |
|
91 |
+OpenStack command-line tools. ``openrc`` sources ``stackrc`` at the |
|
92 |
+beginning (which in turn sources the ``localrc`` section of |
|
93 |
+``local.conf``) in order to pick up ``HOST_IP`` and/or ``SERVICE_HOST`` |
|
94 |
+to use in the endpoints. The values shown below are the default values. |
|
95 |
+ |
|
96 |
+OS\_PROJECT\_NAME (OS\_TENANT\_NAME) |
|
97 |
+ Keystone has |
|
98 |
+ standardized the term *project* as the entity that owns resources. In |
|
99 |
+ some places references still exist to the previous term |
|
100 |
+ *tenant* for this use. Also, *project\_name* is preferred to |
|
101 |
+ *project\_id*. OS\_TENANT\_NAME remains supported for compatibility |
|
102 |
+ with older tools. |
|
103 |
+ |
|
104 |
+ :: |
|
105 |
+ |
|
106 |
+ OS_PROJECT_NAME=demo |
|
107 |
+ |
|
108 |
+OS\_USERNAME |
|
109 |
+ In addition to the owning entity (project), OpenStack calls the entity |
|
110 |
+ performing the action *user*. |
|
111 |
+ |
|
112 |
+ :: |
|
113 |
+ |
|
114 |
+ OS_USERNAME=demo |
|
115 |
+ |
|
116 |
+OS\_PASSWORD |
|
117 |
+ Keystone's default authentication requires a password be provided. |
|
118 |
+ The usual cautions about putting passwords in environment variables |
|
119 |
+ apply, for most DevStack uses this may be an acceptable tradeoff. |
|
120 |
+ |
|
121 |
+ :: |
|
122 |
+ |
|
123 |
+ OS_PASSWORD=secret |
|
124 |
+ |
|
125 |
+HOST\_IP, SERVICE\_HOST |
|
126 |
+ Set API endpoint host using ``HOST_IP``. ``SERVICE_HOST`` may also |
|
127 |
+ be used to specify the endpoint, which is convenient for some |
|
128 |
+ ``local.conf`` configurations. Typically, ``HOST_IP`` is set in the |
|
129 |
+ ``localrc`` section. |
|
130 |
+ |
|
131 |
+ :: |
|
132 |
+ |
|
133 |
+ HOST_IP=127.0.0.1 |
|
134 |
+ SERVICE_HOST=$HOST_IP |
|
135 |
+ |
|
136 |
+OS\_AUTH\_URL |
|
137 |
+ Authenticating against an OpenStack cloud using Keystone returns a |
|
138 |
+ *Token* and *Service Catalog*. The catalog contains the endpoints |
|
139 |
+ for all services the user/tenant has access to - including Nova, |
|
140 |
+ Glance, Keystone and Swift. |
|
141 |
+ |
|
142 |
+ :: |
|
143 |
+ |
|
144 |
+ OS_AUTH_URL=http://$SERVICE_HOST:5000/v2.0 |
|
145 |
+ |
|
146 |
+KEYSTONECLIENT\_DEBUG, NOVACLIENT\_DEBUG |
|
147 |
+ Set command-line client log level to ``DEBUG``. These are commented |
|
148 |
+ out by default. |
|
149 |
+ |
|
150 |
+ :: |
|
151 |
+ |
|
152 |
+ # export KEYSTONECLIENT_DEBUG=1 |
|
153 |
+ # export NOVACLIENT_DEBUG=1 |
|
154 |
+ |
|
155 |
+ |
|
156 |
+ |
|
87 | 157 |
.. _minimal-configuration: |
88 | 158 |
|
89 | 159 |
Minimal Configuration |
... | ... |
@@ -145,6 +214,37 @@ Configuration Notes |
145 | 145 |
.. contents:: |
146 | 146 |
:local: |
147 | 147 |
|
148 |
+Service Repos |
|
149 |
+------------- |
|
150 |
+ |
|
151 |
+The Git repositories used to check out the source for each service are |
|
152 |
+controlled by a pair of variables set for each service. ``*_REPO`` |
|
153 |
+points to the repository and ``*_BRANCH`` selects which branch to |
|
154 |
+check out. These may be overridden in ``local.conf`` to pull source |
|
155 |
+from a different repo for testing, such as a Gerrit branch |
|
156 |
+proposal. ``GIT_BASE`` points to the primary repository server. |
|
157 |
+ |
|
158 |
+ :: |
|
159 |
+ |
|
160 |
+ NOVA_REPO=$GIT_BASE/openstack/nova.git |
|
161 |
+ NOVA_BRANCH=master |
|
162 |
+ |
|
163 |
+To pull a branch directly from Gerrit, get the repo and branch from |
|
164 |
+the Gerrit review page: |
|
165 |
+ |
|
166 |
+ :: |
|
167 |
+ |
|
168 |
+ git fetch https://review.openstack.org/p/openstack/nova refs/changes/50/5050/1 && git checkout FETCH_HEAD |
|
169 |
+ |
|
170 |
+ The repo is the stanza following ``fetch`` and the branch is the |
|
171 |
+ stanza following that: |
|
172 |
+ |
|
173 |
+ :: |
|
174 |
+ |
|
175 |
+ NOVA_REPO=https://review.openstack.org/p/openstack/nova |
|
176 |
+ NOVA_BRANCH=refs/changes/50/5050/1 |
|
177 |
+ |
|
178 |
+ |
|
148 | 179 |
Installation Directory |
149 | 180 |
---------------------- |
150 | 181 |
|
... | ... |
@@ -652,3 +752,40 @@ use the v3 API. It is possible to setup keystone without v2 API, by doing: |
652 | 652 |
:: |
653 | 653 |
|
654 | 654 |
ENABLE_IDENTITY_V2=False |
655 |
+ |
|
656 |
+Exercises |
|
657 |
+~~~~~~~~~ |
|
658 |
+ |
|
659 |
+``exerciserc`` is used to configure settings for the exercise scripts. |
|
660 |
+The values shown below are the default values. These can all be |
|
661 |
+overridden by setting them in the ``localrc`` section. |
|
662 |
+ |
|
663 |
+* Max time to wait while vm goes from build to active state |
|
664 |
+ |
|
665 |
+ :: |
|
666 |
+ |
|
667 |
+ ACTIVE_TIMEOUT==30 |
|
668 |
+ |
|
669 |
+* Max time to wait for proper IP association and dis-association. |
|
670 |
+ |
|
671 |
+ :: |
|
672 |
+ |
|
673 |
+ ASSOCIATE_TIMEOUT=15 |
|
674 |
+ |
|
675 |
+* Max time till the vm is bootable |
|
676 |
+ |
|
677 |
+ :: |
|
678 |
+ |
|
679 |
+ BOOT_TIMEOUT=30 |
|
680 |
+ |
|
681 |
+* Max time from run instance command until it is running |
|
682 |
+ |
|
683 |
+ :: |
|
684 |
+ |
|
685 |
+ RUNNING_TIMEOUT=$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT)) |
|
686 |
+ |
|
687 |
+* Max time to wait for a vm to terminate |
|
688 |
+ |
|
689 |
+ :: |
|
690 |
+ |
|
691 |
+ TERMINATE_TIMEOUT=30 |
655 | 692 |
deleted file mode 100644 |
... | ... |
@@ -1,42 +0,0 @@ |
1 |
-============================== |
|
2 |
-exerciserc - Exercise Settings |
|
3 |
-============================== |
|
4 |
- |
|
5 |
-``exerciserc`` is used to configure settings for the exercise scripts. |
|
6 |
-The values shown below are the default values. These can all be |
|
7 |
-overridden by setting them in the ``localrc`` section. |
|
8 |
- |
|
9 |
-ACTIVE\_TIMEOUT |
|
10 |
- Max time to wait while vm goes from build to active state |
|
11 |
- |
|
12 |
- :: |
|
13 |
- |
|
14 |
- ACTIVE_TIMEOUT==30 |
|
15 |
- |
|
16 |
-ASSOCIATE\_TIMEOUT |
|
17 |
- Max time to wait for proper IP association and dis-association. |
|
18 |
- |
|
19 |
- :: |
|
20 |
- |
|
21 |
- ASSOCIATE_TIMEOUT=15 |
|
22 |
- |
|
23 |
-BOOT\_TIMEOUT |
|
24 |
- Max time till the vm is bootable |
|
25 |
- |
|
26 |
- :: |
|
27 |
- |
|
28 |
- BOOT_TIMEOUT=30 |
|
29 |
- |
|
30 |
-RUNNING\_TIMEOUT |
|
31 |
- Max time from run instance command until it is running |
|
32 |
- |
|
33 |
- :: |
|
34 |
- |
|
35 |
- RUNNING_TIMEOUT=$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT)) |
|
36 |
- |
|
37 |
-TERMINATE\_TIMEOUT |
|
38 |
- Max time to wait for a vm to terminate |
|
39 |
- |
|
40 |
- :: |
|
41 |
- |
|
42 |
- TERMINATE_TIMEOUT=30 |
... | ... |
@@ -1,8 +1,16 @@ |
1 |
-DevStack - an OpenStack Community Production |
|
2 |
-============================================ |
|
1 |
+DevStack |
|
2 |
+======== |
|
3 | 3 |
|
4 | 4 |
.. image:: assets/images/logo-blue.png |
5 | 5 |
|
6 |
+DevStack is a series of extensible scripts used to quickly bring up a |
|
7 |
+complete OpenStack environment. It is used interactively as a |
|
8 |
+development environment and as the basis for much of the OpenStack |
|
9 |
+project's functional testing. |
|
10 |
+ |
|
11 |
+The source is available at |
|
12 |
+`<https://git.openstack.org/cgit/openstack-dev/devstack>`__. |
|
13 |
+ |
|
6 | 14 |
.. toctree:: |
7 | 15 |
:glob: |
8 | 16 |
:maxdepth: 1 |
... | ... |
@@ -12,7 +20,6 @@ DevStack - an OpenStack Community Production |
12 | 12 |
plugins |
13 | 13 |
plugin-registry |
14 | 14 |
faq |
15 |
- changes |
|
16 | 15 |
hacking |
17 | 16 |
|
18 | 17 |
Quick Start |
... | ... |
@@ -147,11 +154,6 @@ Plugins |
147 | 147 |
|
148 | 148 |
:doc:`Extending DevStack with new features <plugins>` |
149 | 149 |
|
150 |
-Recent Changes |
|
151 |
- |
|
152 |
-:doc:`An incomplete summary of recent changes <changes>` |
|
153 |
- |
|
154 | 150 |
FAQ |
155 | 151 |
--- |
156 | 152 |
|
... | ... |
@@ -162,94 +164,3 @@ Contributing |
162 | 162 |
|
163 | 163 |
:doc:`Pitching in to make DevStack a better place <hacking>` |
164 | 164 |
|
165 |
-Code |
|
166 |
-==== |
|
167 |
- |
|
168 |
-*A look at the bits that make it all go* |
|
169 |
- |
|
170 |
-Scripts |
|
171 |
- |
|
172 |
-* `stack.sh <stack.sh.html>`__ - The main script |
|
173 |
-* `functions <functions.html>`__ - DevStack-specific functions |
|
174 |
-* `functions-common <functions-common.html>`__ - Functions shared with other projects |
|
175 |
-* `lib/apache <lib/apache.html>`__ |
|
176 |
-* `lib/ceph <lib/ceph.html>`__ |
|
177 |
-* `lib/cinder <lib/cinder.html>`__ |
|
178 |
-* `lib/database <lib/database.html>`__ |
|
179 |
-* `lib/dstat <lib/dstat.html>`__ |
|
180 |
-* `lib/glance <lib/glance.html>`__ |
|
181 |
-* `lib/heat <lib/heat.html>`__ |
|
182 |
-* `lib/horizon <lib/horizon.html>`__ |
|
183 |
-* `lib/infra <lib/infra.html>`__ |
|
184 |
-* `lib/keystone <lib/keystone.html>`__ |
|
185 |
-* `lib/ldap <lib/ldap.html>`__ |
|
186 |
-* `lib/neutron-legacy <lib/neutron-legacy.html>`__ |
|
187 |
-* `lib/nova <lib/nova.html>`__ |
|
188 |
-* `lib/oslo <lib/oslo.html>`__ |
|
189 |
-* `lib/rpc\_backend <lib/rpc_backend.html>`__ |
|
190 |
-* `lib/swift <lib/swift.html>`__ |
|
191 |
-* `lib/tempest <lib/tempest.html>`__ |
|
192 |
-* `lib/tls <lib/tls.html>`__ |
|
193 |
-* `lib/trove <lib/trove.html>`__ |
|
194 |
-* `unstack.sh <unstack.sh.html>`__ |
|
195 |
-* `clean.sh <clean.sh.html>`__ |
|
196 |
-* `run\_tests.sh <run_tests.sh.html>`__ |
|
197 |
- |
|
198 |
-* `extras.d/60-ceph.sh <extras.d/60-ceph.sh.html>`__ |
|
199 |
-* `extras.d/70-tuskar.sh <extras.d/70-tuskar.sh.html>`__ |
|
200 |
-* `extras.d/80-tempest.sh <extras.d/80-tempest.sh.html>`__ |
|
201 |
- |
|
202 |
-* `inc/ini-config <inc/ini-config.html>`__ |
|
203 |
-* `inc/meta-config <inc/meta-config.html>`__ |
|
204 |
-* `inc/python <inc/python.html>`__ |
|
205 |
- |
|
206 |
-* `pkg/elasticsearch.sh <pkg/elasticsearch.sh.html>`_ |
|
207 |
- |
|
208 |
-Configuration |
|
209 |
- |
|
210 |
-.. toctree:: |
|
211 |
- :glob: |
|
212 |
- :maxdepth: 1 |
|
213 |
- |
|
214 |
- local.conf |
|
215 |
- stackrc |
|
216 |
- openrc |
|
217 |
- exerciserc |
|
218 |
- |
|
219 |
-Tools |
|
220 |
- |
|
221 |
-* `tools/build\_docs.sh <tools/build_docs.sh.html>`__ |
|
222 |
-* `tools/build\_venv.sh <tools/build_venv.sh.html>`__ |
|
223 |
-* `tools/create-stack-user.sh <tools/create-stack-user.sh.html>`__ |
|
224 |
-* `tools/create\_userrc.sh <tools/create_userrc.sh.html>`__ |
|
225 |
-* `tools/fixup\_stuff.sh <tools/fixup_stuff.sh.html>`__ |
|
226 |
-* `tools/info.sh <tools/info.sh.html>`__ |
|
227 |
-* `tools/install\_pip.sh <tools/install_pip.sh.html>`__ |
|
228 |
-* `tools/install\_prereqs.sh <tools/install_prereqs.sh.html>`__ |
|
229 |
-* `tools/make\_cert.sh <tools/make_cert.sh.html>`__ |
|
230 |
-* `tools/upload\_image.sh <tools/upload_image.sh.html>`__ |
|
231 |
- |
|
232 |
-Samples |
|
233 |
- |
|
234 |
-* `local.sh <samples/local.sh.html>`__ |
|
235 |
- |
|
236 |
-Exercises |
|
237 |
- |
|
238 |
-* `exercise.sh <exercise.sh.html>`__ |
|
239 |
-* `exercises/aggregates.sh <exercises/aggregates.sh.html>`__ |
|
240 |
-* `exercises/boot\_from\_volume.sh <exercises/boot_from_volume.sh.html>`__ |
|
241 |
-* `exercises/bundle.sh <exercises/bundle.sh.html>`__ |
|
242 |
-* `exercises/client-args.sh <exercises/client-args.sh.html>`__ |
|
243 |
-* `exercises/client-env.sh <exercises/client-env.sh.html>`__ |
|
244 |
-* `exercises/euca.sh <exercises/euca.sh.html>`__ |
|
245 |
-* `exercises/floating\_ips.sh <exercises/floating_ips.sh.html>`__ |
|
246 |
-* `exercises/horizon.sh <exercises/horizon.sh.html>`__ |
|
247 |
-* `exercises/neutron-adv-test.sh <exercises/neutron-adv-test.sh.html>`__ |
|
248 |
-* `exercises/sec\_groups.sh <exercises/sec_groups.sh.html>`__ |
|
249 |
-* `exercises/swift.sh <exercises/swift.sh.html>`__ |
|
250 |
-* `exercises/volumes.sh <exercises/volumes.sh.html>`__ |
251 | 165 |
deleted file mode 100644 |
... | ... |
@@ -1,9 +0,0 @@ |
1 |
-========================== |
|
2 |
-local.conf - User Settings |
|
3 |
-========================== |
|
4 |
- |
|
5 |
-``local.conf`` is a user-maintained settings file that is sourced in |
|
6 |
-``stackrc``. It contains a section that replaces the historical |
|
7 |
-``localrc`` file. See the description of |
|
8 |
-:doc:`local.conf <configuration>` for more details about the mechanics |
|
9 |
-of the file. |
10 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,68 +0,0 @@ |
1 |
-===================================== |
|
2 |
-openrc - User Authentication Settings |
|
3 |
-===================================== |
|
4 |
- |
|
5 |
-``openrc`` configures login credentials suitable for use with the |
|
6 |
-OpenStack command-line tools. ``openrc`` sources ``stackrc`` at the |
|
7 |
-beginning (which in turn sources the ``localrc`` section of |
|
8 |
-``local.conf``) in order to pick up ``HOST_IP`` and/or ``SERVICE_HOST`` |
|
9 |
-to use in the endpoints. The values shown below are the default values. |
|
10 |
- |
|
11 |
-OS\_PROJECT\_NAME (OS\_TENANT\_NAME) |
|
12 |
- Keystone has |
|
13 |
- standardized the term *project* as the entity that owns resources. In |
|
14 |
- some places references still exist to the previous term |
|
15 |
- *tenant* for this use. Also, *project\_name* is preferred to |
|
16 |
- *project\_id*. OS\_TENANT\_NAME remains supported for compatibility |
|
17 |
- with older tools. |
|
18 |
- |
|
19 |
- :: |
|
20 |
- |
|
21 |
- OS_PROJECT_NAME=demo |
|
22 |
- |
|
23 |
-OS\_USERNAME |
|
24 |
- In addition to the owning entity (project), OpenStack calls the entity |
|
25 |
- performing the action *user*. |
|
26 |
- |
|
27 |
- :: |
|
28 |
- |
|
29 |
- OS_USERNAME=demo |
|
30 |
- |
|
31 |
-OS\_PASSWORD |
|
32 |
- Keystone's default authentication requires a password be provided. |
|
33 |
- The usual cautions about putting passwords in environment variables |
|
34 |
- apply, for most DevStack uses this may be an acceptable tradeoff. |
|
35 |
- |
|
36 |
- :: |
|
37 |
- |
|
38 |
- OS_PASSWORD=secret |
|
39 |
- |
|
40 |
-HOST\_IP, SERVICE\_HOST |
|
41 |
- Set API endpoint host using ``HOST_IP``. ``SERVICE_HOST`` may also |
|
42 |
- be used to specify the endpoint, which is convenient for some |
|
43 |
- ``local.conf`` configurations. Typically, ``HOST_IP`` is set in the |
|
44 |
- ``localrc`` section. |
|
45 |
- |
|
46 |
- :: |
|
47 |
- |
|
48 |
- HOST_IP=127.0.0.1 |
|
49 |
- SERVICE_HOST=$HOST_IP |
|
50 |
- |
|
51 |
-OS\_AUTH\_URL |
|
52 |
- Authenticating against an OpenStack cloud using Keystone returns a |
|
53 |
- *Token* and *Service Catalog*. The catalog contains the endpoints |
|
54 |
- for all services the user/project has access to - including Nova, |
|
55 |
- Glance, Keystone and Swift. |
|
56 |
- |
|
57 |
- :: |
|
58 |
- |
|
59 |
- OS_AUTH_URL=http://$SERVICE_HOST:5000/v2.0 |
|
60 |
- |
|
61 |
-KEYSTONECLIENT\_DEBUG, NOVACLIENT\_DEBUG |
|
62 |
- Set command-line client log level to ``DEBUG``. These are commented |
|
63 |
- out by default. |
|
64 |
- |
|
65 |
- :: |
|
66 |
- |
|
67 |
- # export KEYSTONECLIENT_DEBUG=1 |
|
68 |
- # export NOVACLIENT_DEBUG=1 |
69 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,66 +0,0 @@ |
1 |
-=========================== |
|
2 |
-stackrc - DevStack Settings |
|
3 |
-=========================== |
|
4 |
- |
|
5 |
-``stackrc`` is the primary configuration file for DevStack. It contains |
|
6 |
-all of the settings that control the services started and the |
|
7 |
-repositories used to download the source for those services. ``stackrc`` |
|
8 |
-sources the ``localrc`` section of ``local.conf`` to perform the default |
|
9 |
-overrides. |
|
10 |
- |
|
11 |
-DATABASE\_TYPE |
|
12 |
- Select the database backend to use. The default is ``mysql``, |
|
13 |
- ``postgresql`` is also available. |
|
14 |
-ENABLED\_SERVICES |
|
15 |
- Specify which services to launch. These generally correspond to |
|
16 |
- screen tabs. The default includes: Glance (API and Registry), |
|
17 |
- Keystone, Nova (API, Certificate, Object Store, Compute, Network, |
|
18 |
- Scheduler, Certificate Authentication), Cinder |
|
19 |
- (Scheduler, API, Volume), Horizon, MySQL, RabbitMQ, Tempest. |
|
20 |
- |
|
21 |
- :: |
|
22 |
- |
|
23 |
- ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-cpu,n-net,n-cond,c-sch,c-api,c-vol,n-sch,n-cauth,horizon,rabbit,tempest,$DATABASE_TYPE |
|
24 |
- |
|
25 |
- Other services that are not enabled by default can be enabled in |
|
26 |
- ``localrc``. For example, to add Swift, use the following service |
|
27 |
- names: |
|
28 |
- |
|
29 |
- :: |
|
30 |
- |
|
31 |
- enable_service s-proxy s-object s-container s-account |
|
32 |
- |
|
33 |
- A service can similarly be disabled: |
|
34 |
- |
|
35 |
- :: |
|
36 |
- |
|
37 |
- disable_service horizon |
|
38 |
- |
|
39 |
-Service Repos |
|
40 |
- The Git repositories used to check out the source for each service |
|
41 |
- are controlled by a pair of variables set for each service. |
|
42 |
- ``*_REPO`` points to the repository and ``*_BRANCH`` selects which |
|
43 |
- branch to check out. These may be overridden in ``local.conf`` to |
|
44 |
- pull source from a different repo for testing, such as a Gerrit |
|
45 |
- branch proposal. ``GIT_BASE`` points to the primary repository |
|
46 |
- server. |
|
47 |
- |
|
48 |
- :: |
|
49 |
- |
|
50 |
- NOVA_REPO=$GIT_BASE/openstack/nova.git |
|
51 |
- NOVA_BRANCH=master |
|
52 |
- |
|
53 |
- To pull a branch directly from Gerrit, get the repo and branch from |
|
54 |
- the Gerrit review page: |
|
55 |
- |
|
56 |
- :: |
|
57 |
- |
|
58 |
- git fetch https://review.openstack.org/p/openstack/nova refs/changes/50/5050/1 && git checkout FETCH_HEAD |
|
59 |
- |
|
60 |
- The repo is the stanza following ``fetch`` and the branch is the |
|
61 |
- stanza following that: |
|
62 |
- |
|
63 |
- :: |
|
64 |
- |
|
65 |
- NOVA_REPO=https://review.openstack.org/p/openstack/nova |
|
66 |
- NOVA_BRANCH=refs/changes/50/5050/1 |
67 | 1 |
deleted file mode 100755 |
... | ... |
@@ -1,100 +0,0 @@ |
1 |
-#!/usr/bin/env bash |
|
2 |
- |
|
3 |
-# **build_docs.sh** - Build the docs for DevStack |
|
4 |
-# |
|
5 |
-# - Install shocco if not found on ``PATH`` and ``INSTALL_SHOCCO`` is set |
|
6 |
-# - Clone ``MASTER_REPO`` branch ``MASTER_BRANCH`` |
|
7 |
-# - Re-creates ``doc/build/html`` directory from existing repo + new generated script docs |
|
8 |
- |
|
9 |
-# Usage: |
|
10 |
-## build_docs.sh [-o <out-dir>] |
|
11 |
-## -o <out-dir> Write the static HTML output to <out-dir> |
|
12 |
-## (Note that <out-dir> will be deleted and re-created to ensure it is clean) |
|
13 |
- |
|
14 |
-# Defaults |
|
15 |
-# -------- |
|
16 |
- |
|
17 |
-HTML_BUILD=doc/build/html |
|
18 |
- |
|
19 |
-# Keep track of the DevStack directory |
|
20 |
-TOP_DIR=$(cd $(dirname "$0")/.. && pwd) |
|
21 |
- |
|
22 |
-# Uses this shocco branch: https://github.com/dtroyer/shocco/tree/rst_support |
|
23 |
-SHOCCO=${SHOCCO:-shocco} |
|
24 |
-if ! which shocco; then |
|
25 |
- if [[ ! -x $TOP_DIR/shocco/shocco ]]; then |
|
26 |
- if [[ -z "$INSTALL_SHOCCO" ]]; then |
|
27 |
- echo "shocco not found in \$PATH, please set environment variable SHOCCO" |
|
28 |
- exit 1 |
|
29 |
- fi |
|
30 |
- echo "Installing local copy of shocco" |
|
31 |
- if ! which pygmentize; then |
|
32 |
- sudo pip install Pygments |
|
33 |
- fi |
|
34 |
- if ! which rst2html.py; then |
|
35 |
- sudo pip install docutils |
|
36 |
- fi |
|
37 |
- git clone -b rst_support https://github.com/dtroyer/shocco shocco |
|
38 |
- cd shocco |
|
39 |
- ./configure |
|
40 |
- make || exit |
|
41 |
- cd .. |
|
42 |
- fi |
|
43 |
- SHOCCO=$TOP_DIR/shocco/shocco |
|
44 |
-fi |
|
45 |
- |
|
46 |
-# Process command-line args |
|
47 |
-while getopts o: c; do |
|
48 |
- case $c in |
|
49 |
- o) HTML_BUILD=$OPTARG |
|
50 |
- ;; |
|
51 |
- esac |
|
52 |
-done |
|
53 |
-shift `expr $OPTIND - 1` |
|
54 |
- |
|
55 |
- |
|
56 |
-# Processing |
|
57 |
-# ---------- |
|
58 |
- |
|
59 |
-# Ensure build dir exists |
|
60 |
-mkdir -p $HTML_BUILD |
|
61 |
- |
|
62 |
-# Get fully qualified dirs |
|
63 |
-FQ_HTML_BUILD=$(cd $HTML_BUILD && pwd) |
|
64 |
- |
|
65 |
-# Insert automated bits |
|
66 |
-GLOG=$(mktemp gitlogXXXX) |
|
67 |
-echo "<ul>" >$GLOG |
|
68 |
-git log \ |
|
69 |
- --pretty=format:' <li>%s - <em>Commit <a href="https://review.openstack.org/#q,%h,n,z">%h</a> %cd</em></li>' \ |
|
70 |
- --date=short \ |
|
71 |
- --since '6 months ago' | grep -v Merge >>$GLOG |
|
72 |
-echo "</ul>" >>$GLOG |
|
73 |
-sed -i~ -e $"/^.*%GIT_LOG%.*$/r $GLOG" -e $"/^.*%GIT_LOG%.*$/s/^.*%GIT_LOG%.*$//" $FQ_HTML_BUILD/changes.html |
|
74 |
-rm -f $GLOG |
|
75 |
- |
|
76 |
-# Build list of scripts to process |
|
77 |
-FILES="" |
|
78 |
-for f in $(find . \( -name .git -o -name .tox \) -prune -o \( -type f -name \*.sh -not -path \*shocco/\* -print \)); do |
|
79 |
- echo $f |
|
80 |
- FILES+="$f " |
|
81 |
- mkdir -p $FQ_HTML_BUILD/`dirname $f`; |
|
82 |
- $SHOCCO $f > $FQ_HTML_BUILD/$f.html |
|
83 |
-done |
|
84 |
-for f in $(find functions functions-common inc lib pkg samples -type f -name \* ! -name *.md ! -name *.conf); do |
|
85 |
- echo $f |
|
86 |
- FILES+="$f " |
|
87 |
- mkdir -p $FQ_HTML_BUILD/`dirname $f`; |
|
88 |
- $SHOCCO $f > $FQ_HTML_BUILD/$f.html |
|
89 |
-done |
|
90 |
-echo "$FILES" >doc/files |
|
91 |
- |
|
92 |
-# Clean up or report the temp workspace |
|
93 |
-if [[ -n REPO && -n $PUSH_REPO ]]; then |
|
94 |
- echo rm -rf $TMP_ROOT |
|
95 |
-else |
|
96 |
- if [[ -z "$TMP_ROOT" ]]; then |
|
97 |
- TMP_ROOT="$(pwd)" |
|
98 |
- fi |
|
99 |
- echo "Built docs in $HTML_BUILD" |
|
100 |
-fi |
... | ... |
@@ -17,7 +17,6 @@ whitelist_externals = bash |
17 | 17 |
commands = bash -c "find {toxinidir} \ |
18 | 18 |
-not \( -type d -name .?\* -prune \) \ |
19 | 19 |
-not \( -type d -name doc -prune \) \ |
20 |
- -not \( -type d -name shocco -prune \) \ |
|
21 | 20 |
-not \( -type f -name localrc -prune \) \ |
22 | 21 |
-type f \ |
23 | 22 |
-not -name \*~ \ |
... | ... |
@@ -48,7 +47,5 @@ deps = |
48 | 48 |
whitelist_externals = bash |
49 | 49 |
setenv = |
50 | 50 |
TOP_DIR={toxinidir} |
51 |
- INSTALL_SHOCCO=true |
|
52 |
-commands = |
|
53 |
- python setup.py build_sphinx |
|
54 |
- bash tools/build_docs.sh |
|
51 |
+commands = |
|
52 |
+ python setup.py build_sphinx |