├── .gitignore
├── LICENSE
├── README.md
├── Vagrantfile
├── ansible-hosts-heat.yml
├── ansible-hosts-proxmox.yml
├── ansible-hosts-vagrant.yml
├── ansible.cfg
├── group_vars
└── all
├── heat
└── deployment.yaml
├── img
├── openstack-debian-ansible.png
├── openstack-debian-ansible.svg
├── os1.png
├── os2.png
└── os3.png
├── roles
├── 01_common
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 02_dbserver
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ └── main.yml
│ └── templates
│ │ ├── etc
│ │ └── mysql
│ │ │ └── mariadb.conf.d
│ │ │ └── 99-openstack.cnf
│ │ └── root
│ │ └── .my.cnf
├── 03_dbserver_population
│ └── tasks
│ │ └── main.yml
├── 04_rabbitserver
│ └── tasks
│ │ └── main.yml
├── 05_etcd
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ └── main.yml
│ └── templates
│ │ └── etc
│ │ └── default
│ │ └── etcd
├── 06_openstackclient
│ └── tasks
│ │ └── main.yml
├── 07_keystoneserver
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ └── main.yml
│ └── templates
│ │ └── etc
│ │ └── keystone
│ │ └── default_catalog.templates
├── 08_keystone_population
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ └── main.yml
│ └── templates
│ │ └── root
│ │ ├── demo_openrc
│ │ └── openrc
├── 09_glanceserver
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 10_placement
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 11_novaserver
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 12_novacompute
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 13_novadiscover
│ └── tasks
│ │ └── main.yml
├── 14_neutronserver
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 15_neutronnetwork
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 16_neutroncompute
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 17_horizon
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ └── main.yml
│ └── templates
│ │ └── etc
│ │ └── openstack-dashboard
│ │ └── local_settings.py
├── 18_cinderserver
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 19_cindervolume
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── 20_heatserver
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── magnumserver
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ └── main.yml
│ └── templates
│ │ └── etc
│ │ └── magnum
│ │ └── magnum.conf
├── manilaserver
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ └── main.yml
│ └── templates
│ │ └── etc
│ │ └── manila
│ │ └── manila.conf
├── manilashare
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
└── troveserver
│ ├── handlers
│ └── main.yml
│ ├── tasks
│ └── main.yml
│ └── templates
│ └── etc
│ └── trove
│ ├── trove-conductor.conf
│ ├── trove-guestagent.conf
│ ├── trove-taskmanager.conf
│ └── trove.conf
└── site.yml
/.gitignore:
--------------------------------------------------------------------------------
1 | .vagrant
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
676 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # openstack-debian-ansible
2 |
3 |
4 | Playbooks ansible para la instalación de OpenStack Wallaby sobre Debian 11 Bullseye usando los repositorios backports que encontramos en [Openstack Debian wiki](https://wiki.debian.org/OpenStack).
5 |
6 | Se ha seguido los pasos de la instalación base que se presenta en: [OpenStack Wallaby Installation Guide](https://docs.openstack.org/wallaby/install/) con algunas modificaciones por el uso de Debian.
7 |
8 | La opción de red usada es "Self-service networks" usando linux bridges: [Linux bridge: Self-service networks](https://docs.openstack.org/mitaka/networking-guide/deploy-lb-selfservice.html).
9 |
10 | Estos playbook están escritos para usarlos en el despliegue real de Openstack en servidores físicos, pero se pueden usar para desplegar en entornos de prueba con:
11 |
12 | * Vagrant using vagrant-libvirt plugin.
13 | * OpenStack Heat
14 | * Proxmox
15 |
16 | ## Software usado:
17 |
18 | - Debian GNU/Linux: bullseye (amd64).
19 | - Linux kernel: 5.10.0-13-amd64
20 | - OpenStack: Wallaby
21 | - Ansible: 2.10.8
22 | - Vagrant: 2.2.14
23 | - vagrant-libvirt: 0.3.0
24 | - qemu-kvm: 1:5.2++dfsg-11+deb11u1
25 |
26 | ## Componentes de OpenStack incluidos:
27 |
28 | Keystone, Glance, Placement, Nova, Neutron, Horizon, Cinder and Heat
29 |
30 | ## Instalación con vagrant
31 |
32 | 
33 |
34 | ### Configuración inicial
35 |
36 | Levantamos el escenario:
37 |
38 | vagrant up
39 |
40 | Como el nodo controlador hace también de nodo de red, hemos añadido una interfaz (`eth2`) que siguiendo las instrucciones de la [documentación](https://docs.openstack.org/install-guide/environment-networking-controller.html), vamos a configurar de la siguiente manera:
41 |
42 | vagrant ssh controller
43 | nano /etc/network/interfaces
44 |
45 | Y configuramos la interfaz `eth2` de la siguiente manera:
46 |
47 | ```
48 | auto eth2
49 | iface eth2 inet manual
50 | up ip link set dev $IFACE up
51 | down ip link set dev $IFACE down
52 | ```
53 |
54 | Y reiniciamos la interface:
55 |
56 | ```
57 | ifdown eth2
58 | ifup eth2
59 | ```
60 |
61 |
62 | ### Configuración de ansible
63 |
64 | En el fichero `groups_var/all` se indicanm las variables usadas por el playbook, se pueden modificar para que se adapten a las necesidades. En nuestro caso:
65 |
66 | * `controller_fqdn`: Nombre por el que se puede acceder si queremos usar resolución estática.
67 | * `external_interface: "eth2"`: Interface del controlador que se va a usar cómo entrada (IP flotantes) de las instancias.
68 | * `cinder_physical_device: vdb`: Dispositivo de bloque que se usa en cinder. En nuestro caso el disco que se ha añadido al nodo controlador.
69 |
70 | ## Ejecución de ansible
71 |
72 | ansible-playbook site.yml
73 |
74 | ## Comprobación del funcionamiento
75 |
76 | Desde el controlador vamos a subir una imagen de prueba:
77 |
78 | ```
79 | source admin_openrc.sh
80 | wget http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
81 | openstack image create --public --container-format=bare --disk-format=qcow2 \
82 | --file cirros-0.5.1-x86_64-disk.img "Cirros 0.5.1"
83 | ```
84 |
85 | Creamos un "flavor" de prueba:
86 |
87 | ```
88 | openstack flavor create m1.tiny --id 1 \
89 | --ram 512 --disk 1 --vcpus 1
90 | ```
91 |
92 | A continuación vamos a crear la red externa:
93 |
94 | ```
95 | openstack network create --external \
96 | --provider-physical-network provider \
97 | --provider-network-type flat ext-net
98 |
99 | openstack subnet create --network ext-net \
100 | --allocation-pool start=192.168.98.200,end=192.168.98.254 \
101 | --dns-nameserver 1.1.1.1 --gateway 192.168.98.1 \
102 | --subnet-range 192.168.98.0/24 ext-subnet
103 | ```
104 |
105 | El usuario demo va a crear su red interna y su router:
106 |
107 | ```
108 | source demo_openrc.sh
109 | openstack network create red_demo
110 | openstack subnet create --network red_demo --subnet-range 10.0.0.0/24 subred_demo
111 |
112 | openstack router create router_demo
113 | openstack router set router_demo --external-gateway ext-net
114 | openstack router add subnet router_demo subred_demo
115 | ```
116 |
117 | Y va a abrir el puerto 22 en el grupo de seguridad `default`:
118 |
119 | ```
120 | openstack security group rule create --protocol tcp --remote-ip 0.0.0.0/0 --dst-port 22 default
121 | ```
122 |
123 | Y ya puede crear una instancia:
124 |
125 | ```
126 | openstack server create --flavor m1.tiny \
127 | --image "Cirros 0.5.1" \
128 | --security-group default \
129 | --network "red_demo" \
130 | instancia_prueba
131 | ```
132 |
133 |
134 | Y obtenemos una ip flotante y la asignamos a la instancia:
135 |
136 | ```
137 | openstack floating ip create ext-net
138 | openstack server add floating ip instancia_prueba 192.168.98.203
139 | ```
140 |
141 | Y desde nuestro ordenador podemos acceder por ssh:
142 |
143 | ```
144 | ssh cirros@192.168.98.203
145 | The authenticity of host '192.168.98.203 (192.168.98.203)' can't be established.
146 | ECDSA key fingerprint is SHA256:iNC3IMeMwoNJG3Q+LBQy5AbTNWFym+PfcHTq0mBDttI.
147 | Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
148 | Warning: Permanently added '192.168.98.203' (ECDSA) to the list of known hosts.
149 | cirros@192.168.98.203's password:
150 | $
151 | ```
152 |
153 | ## Acceso a horizon
154 |
155 | Tienes que acceder a la URL `https://192.168.98.101`:
156 |
157 | 
158 |
159 | 
160 |
161 | ## Volúmenes
162 |
163 | El usuario demo crea un volumen y lo asocia a la instancia:
164 |
165 | ```
166 | openstack volume create --size 1 mi_disco1
167 | openstack server add volume --device /dev/sdb instancia_prueba mi_disco1
168 | ```
169 |
170 | Desde la instancia comprobamos que se ha asociado:
171 |
172 | ```
173 | $ lsblk
174 | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
175 | ...
176 | vdb 252:16 0 1G 0 disk
177 | ```
178 | 
179 |
--------------------------------------------------------------------------------
/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 |
4 | Vagrant.configure("2") do |config|
5 | config.vm.define :controller do |controller|
6 | controller.vm.box = "debian/bullseye64"
7 | controller.vm.hostname = "controller"
8 | controller.vm.network :private_network, ip: "192.168.98.101"
9 | controller.vm.network :private_network, ip: "192.168.98.103"
10 | controller.vm.network :private_network, ip: "192.168.99.101"
11 | controller.nfs.verify_installed = false
12 | controller.vm.synced_folder '.', '/vagrant', disabled: true
13 | controller.vm.provider "libvirt" do |libvirt|
14 | libvirt.memory = "10240"
15 | libvirt.storage :file, :size => '3G', :path => 'disk.img', :allow_existing => true, :shareable => true, :type => 'raw'
16 | end
17 | end
18 | config.vm.define :compute do |compute|
19 | compute.vm.box = "debian/bullseye64"
20 | compute.vm.hostname = "compute1"
21 | compute.vm.network :private_network, ip: "192.168.98.102"
22 | compute.vm.network :private_network, ip: "192.168.99.102"
23 | compute.nfs.verify_installed = false
24 | compute.vm.synced_folder '.', '/vagrant', disabled: true
25 | compute.vm.provider "libvirt" do |libvirt|
26 | libvirt.memory = "2048"
27 | libvirt.nested = true
28 | end
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/ansible-hosts-heat.yml:
--------------------------------------------------------------------------------
1 | all:
2 | children:
3 | controller-nodes:
4 | hosts:
5 | controller:
6 | ansible_host: 172.22.200.170
7 | ansible_ssh_user: debian
8 | external_ip: 192.168.98.101
9 | internal_ip: 192.168.99.101
10 | storage-nodes:
11 | hosts:
12 | controller:
13 | ansible_host: 172.22.200.170
14 | ansible_ssh_user: debian
15 | external_ip: 192.168.98.101
16 | internal_ip: 192.168.99.101
17 | network-nodes:
18 | hosts:
19 | controller:
20 | ansible_host: 172.22.200.170
21 | ansible_ssh_user: debian
22 | external_ip: 192.168.98.101
23 | internal_ip: 192.168.99.101
24 | compute-nodes:
25 | hosts:
26 | compute:
27 | ansible_host: 172.22.200.156
28 | ansible_ssh_user: debian
29 | external_ip: 192.168.98.102
30 | internal_ip: 192.168.99.102
31 |
--------------------------------------------------------------------------------
/ansible-hosts-proxmox.yml:
--------------------------------------------------------------------------------
1 | all:
2 | children:
3 | controller_nodes:
4 | hosts:
5 | jupiter:
6 | ansible_host: 192.168.121.1
7 | ansible_ssh_user: usuario
8 | external_ip: 172.22.121.1
9 | internal_ip: 192.168.121.1
10 | storage_nodes:
11 | hosts:
12 | saturno:
13 | ansible_host: 192.168.121.6
14 | ansible_ssh_user: usuario
15 | external_ip: 172.22.121.6
16 | internal_ip: 192.168.121.6
17 | network_nodes:
18 | hosts:
19 | corot:
20 | ansible_host: 192.168.121.2
21 | ansible_ssh_user: usuario
22 | external_ip: 172.22.121.2
23 | internal_ip: 192.168.121.2
24 | compute_nodes:
25 | hosts:
26 | io:
27 | ansible_host: 192.168.121.3
28 | ansible_ssh_user: usuario
29 | external_ip: 172.22.121.3
30 | internal_ip: 192.168.121.3
31 | europa:
32 | ansible_host: 192.168.121.4
33 | ansible_ssh_user: usuario
34 | external_ip: 172.22.121.4
35 | internal_ip: 192.168.121.4
36 |
--------------------------------------------------------------------------------
/ansible-hosts-vagrant.yml:
--------------------------------------------------------------------------------
1 | all:
2 | children:
3 | controller_nodes:
4 | hosts:
5 | controller:
6 | ansible_host: 192.168.99.101
7 | ansible_ssh_user: vagrant
8 | ansible_ssh_private_key_file: .vagrant/machines/controller/libvirt/private_key
9 | external_ip: 192.168.98.101
10 | internal_ip: 192.168.99.101
11 | storage_nodes:
12 | hosts:
13 | controller:
14 | ansible_host: 192.168.99.101
15 | ansible_ssh_user: vagrant
16 | ansible_ssh_private_key_file: .vagrant/machines/controller/libvirt/private_key
17 | external_ip: 192.168.98.101
18 | internal_ip: 192.168.99.101
19 | network_nodes:
20 | hosts:
21 | controller:
22 | ansible_host: 192.168.99.101
23 | ansible_ssh_user: vagrant
24 | ansible_ssh_private_key_file: .vagrant/machines/controller/libvirt/private_key
25 | external_ip: 192.168.98.101
26 | internal_ip: 192.168.99.101
27 | compute_nodes:
28 | hosts:
29 | compute:
30 | ansible_host: 192.168.99.102
31 | ansible_ssh_user: vagrant
32 | ansible_ssh_private_key_file: .vagrant/machines/compute/libvirt/private_key
33 | external_ip: 192.168.98.102
34 | internal_ip: 192.168.99.102
35 |
--------------------------------------------------------------------------------
/ansible.cfg:
--------------------------------------------------------------------------------
1 | [defaults]
2 | inventory = ansible-hosts-vagrant.yml
3 | host_key_checking = False
4 |
--------------------------------------------------------------------------------
/group_vars/all:
--------------------------------------------------------------------------------
1 | # Common
2 | timezone: Europe/Madrid
3 |
4 | # Controller
5 | controller_fqdn: controller
6 |
7 |
8 | # KEYSTONE_3
9 | k3:
10 | OS_USERNAME: admin
11 | OS_PASSWORD: asdasd
12 | OS_PROJECT_NAME: admin
13 | OS_USER_DOMAIN_NAME: Default
14 | OS_PROJECT_DOMAIN_NAME: Default
15 | OS_AUTH_URL: 'http://192.168.99.101:5000/v3'
16 | OS_IDENTITY_API_VERSION: 3
17 |
18 | # Rabbit
19 | rabbit_user: "openstack"
20 | rabbit_password: "asdasd"
21 |
22 | # # MySQL passwords
23 | root_db_password: "asdasd"
24 | keystone_db_password: "asdasd"
25 | glance_db_password: "asdasd"
26 | cinder_db_password: "asdasd"
27 | manila_db_password: "asdasd"
28 | placement_db_password: "asdasd"
29 | nova_db_password: "asdasd"
30 | neutron_db_password: "asdasd"
31 | heat_db_password: "asdasd"
32 | trove_db_password: "asdasd"
33 | magnum_db_password: "asdasd"
34 |
35 |
36 | # # Keystone identity passwords:
37 | glance_identity_password: "glance"
38 | placement_identity_password: "placement"
39 | nova_identity_password: "nova"
40 | ec2_identity_password: "ec2"
41 | neutron_identity_password: "neutron"
42 | cinder_identity_password: "cinder"
43 | manila_identity_password: "manila"
44 | heat_identity_password: "heat"
45 | heat_domain_admin_identity_password: "heat"
46 | trove_identity_password: "trove"
47 | magnum_identity_password: "magnum"
48 |
49 | # # OpenStack variables
50 | region: RegionOne
51 | admin_pass: "asdasd"
52 | demo_pass: "asdasd"
53 |
54 | # # Log verbosity
55 | log_debug: False
56 | # log_verbose: True
57 |
58 | # # Neutron
59 | shared_secret: "asdasd"
60 | external_interface: "eth2"
61 |
62 | # Cinder
63 | cinder_physical_device: vdb
64 |
--------------------------------------------------------------------------------
/heat/deployment.yaml:
--------------------------------------------------------------------------------
1 | heat_template_version: newton
2 |
3 | description: 1 controller node and 1 compute node
4 |
5 | parameters:
6 | flavor_controller:
7 | type: string
8 | default: "m1.xlarge" #Must be defined
9 | flavor_compute:
10 | type: string
11 | default: "m1.large" #Must be defined
12 | image:
13 | type: string
14 | default: "bf688ff8-549e-4de6-8e96-13b10e85f1fe" #Must be defined
15 | ext_net:
16 | type: string
17 | default: "49812d85-8e7a-4c31-baa2-d427692f6568" #Must be defined
18 | pubkey:
19 | type: string
20 | default: "clave-openstack" #Must be defined
21 | dns_server:
22 | type: string
23 | default: 192.168.202.2 #Must be defined
24 | # fixed IPs
25 | controller_ext_ip:
26 | type: string
27 | default: 192.168.98.101
28 | controller_int_ip:
29 | type: string
30 | default: 192.168.99.101
31 | compute_ext_ip:
32 | type: string
33 | default: 192.168.98.102
34 | compute_int_ip:
35 | type: string
36 | default: 192.168.99.102
37 |
38 | resources:
39 | # Volumes
40 | controller_cinder_vol:
41 | type: OS::Cinder::Volume
42 | properties:
43 | availability_zone: nova
44 | size: 10
45 |
46 | controller_manila_vol:
47 | type: OS::Cinder::Volume
48 | properties:
49 | availability_zone: nova
50 | size: 10
51 |
52 | # Networks and subnets
53 | external_net:
54 | type: OS::Neutron::Net
55 | properties:
56 | name: "External Network"
57 | internal_net:
58 | type: OS::Neutron::Net
59 | properties:
60 | name: "Internal Network"
61 |
62 | subnet1:
63 | type: OS::Neutron::Subnet
64 | properties:
65 | network: { get_resource: external_net }
66 | cidr: 192.168.98.0/24
67 | dns_nameservers: [{ get_param: dns_server}]
68 | subnet2:
69 | type: OS::Neutron::Subnet
70 | properties:
71 | network: { get_resource: internal_net }
72 | cidr: 192.168.99.0/24
73 | dns_nameservers: [{ get_param: dns_server}]
74 | gateway_ip: null
75 |
76 | # Ports defined with fixed IPs and port security disabled
77 | controller_ext_port:
78 | type: OS::Neutron::Port
79 | properties:
80 | network: { get_resource: external_net }
81 | fixed_ips:
82 | - subnet: { get_resource: subnet1 }
83 | ip_address: { get_param: controller_ext_ip }
84 | port_security_enabled: false
85 | controller_int_port:
86 | type: OS::Neutron::Port
87 | properties:
88 | network: { get_resource: internal_net }
89 | fixed_ips:
90 | - subnet: { get_resource: subnet2 }
91 | ip_address: { get_param: controller_int_ip }
92 | port_security_enabled: false
93 | compute_ext_port:
94 | type: OS::Neutron::Port
95 | properties:
96 | network: { get_resource: external_net }
97 | fixed_ips:
98 | - subnet: { get_resource: subnet1 }
99 | ip_address: { get_param: compute_ext_ip }
100 | port_security_enabled: false
101 | compute_int_port:
102 | type: OS::Neutron::Port
103 | properties:
104 | network: { get_resource: internal_net }
105 | fixed_ips:
106 | - subnet: { get_resource: subnet2 }
107 | ip_address: { get_param: compute_int_ip }
108 | port_security_enabled: false
109 |
110 | # Floating IPs
111 | controller_floating_ip:
112 | type: OS::Nova::FloatingIP
113 | properties:
114 | pool: ext-net
115 | compute_floating_ip:
116 | type: OS::Nova::FloatingIP
117 | properties:
118 | pool: ext-net
119 |
120 | # Controller server
121 | controller:
122 | type: OS::Nova::Server
123 | properties:
124 | name: "controller"
125 | flavor: { get_param: flavor_controller }
126 | image: { get_param: image }
127 | key_name: { get_param: pubkey }
128 | networks:
129 | - { port: { get_resource: controller_ext_port } }
130 | - { port: { get_resource: controller_int_port } }
131 |
132 | # Compute server
133 | compute:
134 | type: OS::Nova::Server
135 | properties:
136 | name: "compute"
137 | flavor: { get_param: flavor_compute }
138 | image: { get_param: image }
139 | key_name: { get_param: pubkey }
140 | networks:
141 | - { port: { get_resource: compute_ext_port } }
142 | - { port: { get_resource: compute_int_port } }
143 |
144 | # External router
145 | r1:
146 | type: OS::Neutron::Router
147 | properties:
148 | name: "Router 1"
149 | external_gateway_info:
150 | network: { get_param: ext_net }
151 |
152 | r1_external_network:
153 | type: OS::Neutron::RouterInterface
154 | properties:
155 | router_id: { get_resource: r1 }
156 | subnet_id: { get_resource: subnet1 }
157 |
158 | # Floating IP associations
159 | controller_ip_association:
160 | type: OS::Neutron::FloatingIPAssociation
161 | properties:
162 | floatingip_id: { get_resource: controller_floating_ip }
163 | port_id: { get_resource: controller_ext_port }
164 | compute_ip_association:
165 | type: OS::Neutron::FloatingIPAssociation
166 | properties:
167 | floatingip_id: { get_resource: compute_floating_ip }
168 | port_id: { get_resource: compute_ext_port }
169 |
170 | # Volume attachments
171 | cinder_attach:
172 | type: OS::Cinder::VolumeAttachment
173 | properties:
174 | instance_uuid: { get_resource: controller }
175 | volume_id: { get_resource: controller_cinder_vol }
176 | manila_attach:
177 | type: OS::Cinder::VolumeAttachment
178 | properties:
179 | instance_uuid: { get_resource: controller }
180 | volume_id: { get_resource: controller_manila_vol }
181 |
182 | outputs:
183 | controller_floating_ip:
184 | description: "Controller's floating IP"
185 | value: { get_attr: [controller_floating_ip, show] }
186 | compute_floating_ip:
187 | description: "Compute's floating IP"
188 | value: { get_attr: [compute_floating_ip, show] }
189 |
--------------------------------------------------------------------------------
/img/openstack-debian-ansible.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iesgn/openstack-debian-ansible/6e38a57cb11716c6aca1316015f67352a75e1a16/img/openstack-debian-ansible.png
--------------------------------------------------------------------------------
/img/os1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iesgn/openstack-debian-ansible/6e38a57cb11716c6aca1316015f67352a75e1a16/img/os1.png
--------------------------------------------------------------------------------
/img/os2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iesgn/openstack-debian-ansible/6e38a57cb11716c6aca1316015f67352a75e1a16/img/os2.png
--------------------------------------------------------------------------------
/img/os3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iesgn/openstack-debian-ansible/6e38a57cb11716c6aca1316015f67352a75e1a16/img/os3.png
--------------------------------------------------------------------------------
/roles/01_common/handlers/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # handlers for the common tasks
3 |
4 | - name: apt update
5 | apt: update_cache=yes
6 |
7 | - name: restart ntp
8 | service: name=ntp state=restarted
9 |
10 |
--------------------------------------------------------------------------------
/roles/01_common/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: Ensure apt info is updated
2 | apt: update_cache=yes
3 |
4 | - name: Ensure gnupg is installed
5 | apt:
6 | pkg:
7 | - gnupg
8 |
9 | - name: Add openstack repository into sources list
10 | ansible.builtin.apt_repository:
11 | repo: 'deb http://osbpo.debian.net/osbpo bullseye-wallaby-backports main'
12 | update_cache: no
13 | state: present
14 |
15 | - name: Add openstack repository into sources list
16 | ansible.builtin.apt_repository:
17 | repo: 'deb http://osbpo.debian.net/osbpo bullseye-wallaby-backports-nochange main'
18 | update_cache: no
19 | state: present
20 |
21 |
22 | - name: Ensure osbpo GPG key is added
23 | apt_key: url=http://osbpo.debian.net/osbpo/dists/pubkey.gpg state=present
24 |
25 |
26 | - name: Ensure system is updated and upgraded
27 | apt: update_cache=yes upgrade=yes
28 |
29 |
30 | - name: "Build hosts file"
31 | lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].internal_ip }} {{item}}" state=present
32 | when: hostvars[item].internal_ip is defined
33 | with_items: "{{ groups.all }}"
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/roles/02_dbserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart mariadb
2 | service: name=mariadb state=restarted
3 |
--------------------------------------------------------------------------------
/roles/02_dbserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: Ensure mariadb server and python-pymysql are installed
2 | apt:
3 | pkg:
4 | - mariadb-server
5 | - python3-pymysql
6 |
7 | - name: Ensure 99-openstack.cnf is present
8 | template:
9 | src: etc/mysql/mariadb.conf.d/99-openstack.cnf
10 | dest: /etc/mysql/mariadb.conf.d/99-openstack.cnf
11 | owner: root
12 | group: root
13 | mode: 0664
14 | notify: restart mariadb
15 |
16 | # http://dev.mysql.com/doc/refman/5.6/en/default-privileges.html
17 | - name: set mariadb root password
18 | mysql_user:
19 | name: root
20 | password: "{{ root_db_password }}"
21 | login_unix_socket: /var/run/mysqld/mysqld.sock
22 |
23 | # Need to do this for idempotency, see
24 | # http://ansible.cc/docs/modules.html#mysql-user
25 | - name: copy .my.cnf file with root password credentials
26 | template:
27 | src: "root/.my.cnf"
28 | dest: "/root/.my.cnf"
29 | owner: root
30 | group: root
31 | mode: 0600
32 |
33 | - name: update mysql root password for all root accounts
34 | mysql_user:
35 | name: root
36 | host: "{{ item }}"
37 | password: "{{ root_db_password }}"
38 | loop:
39 | - "{{ internal_ip }}"
40 | - 127.0.0.1
41 |
42 |
--------------------------------------------------------------------------------
/roles/02_dbserver/templates/etc/mysql/mariadb.conf.d/99-openstack.cnf:
--------------------------------------------------------------------------------
1 | [mysqld]
2 | bind-address = {{ internal_ip }}
3 |
4 | default-storage-engine = innodb
5 | innodb_file_per_table = on
6 | max_connections = 4096
7 | collation-server = utf8_general_ci
8 | character-set-server = utf8
--------------------------------------------------------------------------------
/roles/02_dbserver/templates/root/.my.cnf:
--------------------------------------------------------------------------------
1 | [client]
2 | user=root
3 | password={{ root_db_password }}
4 | socket = /var/run/mysqld/mysqld.sock
--------------------------------------------------------------------------------
/roles/03_dbserver_population/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure keystone database is present
2 | mysql_db: name=keystone
3 |
4 | - name: ensure keystone database user is present
5 | mysql_user:
6 | name: keystone
7 | host: "{{ item }}"
8 | password: "{{ keystone_db_password }}"
9 | priv: 'keystone.*:ALL'
10 | loop:
11 | - '%'
12 | - localhost
13 |
14 | - name: ensure glance database is present
15 | mysql_db:
16 | name: glance
17 |
18 | - name: ensure glance database user is present
19 | mysql_user:
20 | name: glance
21 | host: "{{ item }}"
22 | password: "{{ glance_db_password }}"
23 | priv: 'glance.*:ALL'
24 | loop:
25 | - '%'
26 | - localhost
27 |
28 |
29 | - name: ensure cinder database is present
30 | mysql_db: name=cinder
31 |
32 | - name: ensure cinder database user is present
33 | mysql_user:
34 | name: cinder
35 | host: "{{ item }}"
36 | password: "{{ cinder_db_password }}"
37 | priv: 'cinder.*:ALL'
38 | loop:
39 | - '%'
40 | - localhost
41 |
42 |
43 | #- name: ensure manila database is present
44 | # mysql_db: name=manila
45 | #
46 | #- name: ensure manila database user is present
47 | # mysql_user:
48 | # name: manila
49 | # host: "{{ item }}"
50 | # password: "{{ manila_db_password }}"
51 | # priv: 'manila.*:ALL'
52 | # loop:
53 | # - '%'
54 | # - localhost
55 | #
56 |
57 | - name: ensure placement databases is present
58 | mysql_db: name=placement
59 |
60 | - name: ensure placement database user is present
61 | mysql_user:
62 | name: placement
63 | host: "{{ item }}"
64 | password: "{{ placement_db_password }}"
65 | priv: 'placement.*:ALL'
66 | loop:
67 | - '%'
68 | - localhost
69 |
70 |
71 | - name: ensure nova, nova_cell0 and nova_api databases are present
72 | mysql_db: name={{ item }}
73 | loop:
74 | - nova
75 | - nova_api
76 | - nova_cell0
77 |
78 | - name: ensure nova database user is present in nova
79 | mysql_user:
80 | name: nova
81 | host: "{{ item }}"
82 | password: "{{ nova_db_password }}"
83 | priv: 'nova.*:ALL'
84 | loop:
85 | - '%'
86 | - localhost
87 |
88 |
89 | - name: ensure nova database user is present in nova_api
90 | mysql_user:
91 | name: nova
92 | host: "{{ item }}"
93 | password: "{{ nova_db_password }}"
94 | priv: 'nova_api.*:ALL'
95 | append_privs: yes
96 | loop:
97 | - '%'
98 | - localhost
99 |
100 |
101 | - name: ensure nova database user is present in nova_cell0
102 | mysql_user:
103 | name: nova
104 | host: "{{ item }}"
105 | password: "{{ nova_db_password }}"
106 | priv: 'nova_cell0.*:ALL'
107 | append_privs: yes
108 | loop:
109 | - '%'
110 | - localhost
111 |
112 |
113 | - name: ensure neutron database is present
114 | mysql_db: name=neutron
115 |
116 | - name: ensure neutron database user is present
117 | mysql_user:
118 | name: neutron
119 | host: "{{ item }}"
120 | password: "{{ neutron_db_password }}"
121 | priv: 'neutron.*:ALL'
122 | loop:
123 | - '%'
124 | - localhost
125 |
126 |
127 | - name: ensure heat database is present
128 | mysql_db: name=heat
129 |
130 | - name: ensure heat database user is present
131 | mysql_user:
132 | name: heat
133 | host: "{{ item }}"
134 | password: "{{ heat_db_password }}"
135 | priv: 'heat.*:ALL'
136 | loop:
137 | - '%'
138 | - localhost
139 |
140 |
141 | #- name: ensure trove database is present
142 | # mysql_db: name=trove
143 | #
144 | #- name: ensure trove database user is present
145 | # mysql_user:
146 | # name: trove
147 | # host: "{{ item }}"
148 | # password: "{{ trove_db_password }}"
149 | # priv: 'trove.*:ALL'
150 | # loop:
151 | # - '%'
152 | # - localhost
153 | #
154 | #
155 | #- name: ensure magnum database is present
156 | # mysql_db: name=magnum
157 | #
158 | #- name: ensure magnum database user is present
159 | # mysql_user:
160 | # name: magnum
161 | # host: "{{ item }}"
162 | # password: "{{ magnum_db_password }}"
163 | # priv: 'magnum.*:ALL'
164 | # loop:
165 | # - '%'
166 | # - localhost
167 | #
168 | #
--------------------------------------------------------------------------------
/roles/04_rabbitserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: Ensure rabbitmq is installed
2 | apt: name=rabbitmq-server
3 |
4 | - name: Ensure openstack rabbitmq user password is changed
5 | rabbitmq_user:
6 | user: "{{ rabbit_user }}"
7 | password: "{{ rabbit_password }}"
8 | vhost: '/'
9 | configure_priv: '.*'
10 | read_priv: '.*'
11 | write_priv: '.*'
12 | state: present
13 | force: yes
14 |
--------------------------------------------------------------------------------
/roles/05_etcd/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart etcd
2 | service: name=etcd state=restarted
3 |
--------------------------------------------------------------------------------
/roles/05_etcd/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: Ensure etcd is installed
2 | apt: name=etcd
3 |
4 | - name: Ensure etcd config is present
5 | template:
6 | src: etc/default/etcd
7 | dest: /etc/default/etcd
8 | owner: root
9 | group: root
10 | mode: 0664
11 | notify: restart etcd
--------------------------------------------------------------------------------
/roles/05_etcd/templates/etc/default/etcd:
--------------------------------------------------------------------------------
1 | ETCD_NAME="controller"
2 | ETCD_DATA_DIR="/var/lib/etcd"
3 | ETCD_INITIAL_CLUSTER_STATE="new"
4 | ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01"
5 | ETCD_INITIAL_CLUSTER="controller=http://{{ internal_ip }}:2380"
6 | ETCD_INITIAL_ADVERTISE_PEER_URLS="http://{{ internal_ip }}:2380"
7 | ETCD_ADVERTISE_CLIENT_URLS="http://{{ internal_ip }}:2379"
8 | ETCD_LISTEN_PEER_URLS="http://0.0.0.0:2380"
9 | ETCD_LISTEN_CLIENT_URLS="http://{{ internal_ip }}:2379"
10 |
--------------------------------------------------------------------------------
/roles/06_openstackclient/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure python-openstackclient is installed
2 | apt: name=python3-openstackclient
3 |
4 | - name: ensure the rest of openstack clients are installed
5 | apt:
6 | pkg:
7 | - python3-heatclient
8 |
--------------------------------------------------------------------------------
/roles/07_keystoneserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart keystone
2 | service: name=keystone state=restarted
3 |
4 |
--------------------------------------------------------------------------------
/roles/07_keystoneserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure keystone and memcached are installed
2 | apt: name={{ item }}
3 | loop:
4 | - keystone
5 | - memcached
6 | - python3-memcache
7 |
8 | - name: ensure keystone database connections is configured
9 | ini_file:
10 | path: /etc/keystone/keystone.conf
11 | section: database
12 | option: connection
13 | value: mysql+pymysql://keystone:{{ keystone_db_password }}@{{ internal_ip }}/keystone
14 | notify: restart keystone
15 |
16 | - name: ensure keystone is configured to use fernet tokens
17 | ini_file:
18 | path: /etc/keystone/keystone.conf
19 | section: token
20 | option: provider
21 | value: fernet
22 | notify: restart keystone
23 |
24 | - name: ensure cache is enabled in keystone
25 | ini_file:
26 | path: /etc/keystone/keystone.conf
27 | section: cache
28 | option: enabled
29 | value: 'true'
30 | notify: restart keystone
31 |
32 | - name: ensure dogfile.cache.memcached is configured as backend for cache
33 | ini_file:
34 | path: /etc/keystone/keystone.conf
35 | section: cache
36 | option: backend
37 | value: dogpile.cache.memcached
38 | notify: restart keystone
39 |
40 | - name: ensure memcached url is set for dogfile
41 | ini_file:
42 | path: /etc/keystone/keystone.conf
43 | section: cache
44 | option: backend_argument
45 | value: url:127.0.0.1:11211
46 | notify: restart keystone
47 |
48 | - name: ensure keystone is configured to use template catalog
49 | ini_file:
50 | path: /etc/keystone/keystone.conf
51 | section: catalog
52 | option: driver
53 | value: templated
54 | notify: restart keystone
55 |
56 | - name: ensure keystone template catalog is updated
57 | template:
58 | src: etc/keystone/default_catalog.templates
59 | dest: /etc/keystone/default_catalog.templates
60 | owner: keystone
61 | group: keystone
62 | mode: 0644
63 | notify: restart keystone
64 |
65 |
66 | - name: DB sync for keystone
67 | shell: keystone-manage db_sync
68 |
69 | - name: Fernet keys initialization
70 | shell: /usr/bin/keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone && keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
71 |
72 | - name: bootstrap identity service
73 | shell: keystone-manage bootstrap --bootstrap-password '{{ admin_pass }}' --bootstrap-admin-url http://{{ internal_ip }}:5000/v3/ --bootstrap-internal-url http://{{ internal_ip }}:5000/v3/ --bootstrap-public-url http://{{ controller_fqdn }}:5000/v3/ --bootstrap-region-id {{ region }}
74 | register: kb
75 | failed_when: "kb.rc not in [ 0, 1 ]"
76 |
77 |
--------------------------------------------------------------------------------
/roles/07_keystoneserver/templates/etc/keystone/default_catalog.templates:
--------------------------------------------------------------------------------
1 | catalog.{{ region }}.identity.publicURL = http://{{ controller_fqdn }}:5000/v3
2 | catalog.{{ region }}.identity.adminURL = http://{{ internal_ip }}:5000/v3
3 | catalog.{{ region }}.identity.internalURL = http://{{ internal_ip }}:5000/v3
4 | catalog.{{ region }}.identity.descrition = "Identity Service"
5 | catalog.{{ region }}.identity.name = keystone
6 |
7 | catalog.{{ region }}.compute.publicURL = http://{{ external_ip }}:8774/v2.1
8 | catalog.{{ region }}.compute.adminURL = http://{{ internal_ip }}:8774/v2.1
9 | catalog.{{ region }}.compute.internalURL = http://{{ internal_ip }}:8774/v2.1
10 | catalog.{{ region }}.compute.descrition = "Compute Service"
11 | catalog.{{ region }}.compute.name = nova
12 |
13 | catalog.{{ region }}.placement.publicURL = http://{{ external_ip }}:8778
14 | catalog.{{ region }}.placement.adminURL = http://{{ internal_ip }}:8778
15 | catalog.{{ region }}.placement.internalURL = http://{{ internal_ip }}:8778
16 | catalog.{{ region }}.placement.descrition = "Placement Service"
17 | catalog.{{ region }}.placement.name = placement
18 |
19 | catalog.{{ region }}.volumev2.publicURL = http://{{ external_ip }}:8776/v2/%(project_id)s
20 | catalog.{{ region }}.volumev2.adminURL = http://{{ internal_ip }}:8776/v2/%(project_id)s
21 | catalog.{{ region }}.volumev2.internalURL = http://{{ internal_ip }}:8776/v2/%(project_id)s
22 | catalog.{{ region }}.volumev2.descrition = "Block Storage Service v2"
23 | catalog.{{ region }}.volumev2.name = cinderv2
24 |
25 | catalog.{{ region }}.volumev3.publicURL = http://{{ external_ip }}:8776/v3/%(project_id)s
26 | catalog.{{ region }}.volumev3.adminURL = http://{{ internal_ip }}:8776/v3/%(project_id)s
27 | catalog.{{ region }}.volumev3.internalURL = http://{{ internal_ip }}:8776/v3/%(project_id)s
28 | catalog.{{ region }}.volumev3.descrition = "Block Storage Service v3"
29 | catalog.{{ region }}.volumev3.name = cinderv3
30 |
31 | catalog.{{ region }}.ec2.publicURL = http://{{ external_ip }}:8773/services/Cloud
32 | catalog.{{ region }}.ec2.adminURL = http://{{ internal_ip }}:8773/services/Admin
33 | catalog.{{ region }}.ec2.internalURL = http://{{ internal_ip }}:8773/services/Cloud
34 | catalog.{{ region }}.ec2.name = ec2
35 |
36 | catalog.{{ region }}.image.publicURL = http://{{ hostvars[groups['storage_nodes'][0]]['external_ip'] }}:9292
37 | catalog.{{ region }}.image.adminURL = http://{{ hostvars[groups['storage_nodes'][0]]['internal_ip'] }}:9292
38 | catalog.{{ region }}.image.internalURL = http://{{ hostvars[groups['storage_nodes'][0]]['internal_ip'] }}:9292
39 | catalog.{{ region }}.image.descrition = "Image Service"
40 | catalog.{{ region }}.image.name = glance
41 |
42 | catalog.{{ region }}.network.publicURL = http://{{ external_ip }}:9696
43 | catalog.{{ region }}.network.adminURL = http://{{ internal_ip }}:9696
44 | catalog.{{ region }}.network.internalURL = http://{{ internal_ip }}:9696
45 | catalog.{{ region }}.network.descrition = "Networking Service"
46 | catalog.{{ region }}.network.name = neutron
47 |
48 | catalog.{{ region }}.orchestration.publicURL = http://{{ external_ip }}:8004/v1/$(tenant_id)s
49 | catalog.{{ region }}.orchestration.adminURL = http://{{ internal_ip }}:8004/v1/$(tenant_id)s
50 | catalog.{{ region }}.orchestration.internalURL = http://{{ internal_ip }}:8004/v1/$(tenant_id)s
51 | catalog.{{ region }}.orchestration.name = heat
52 |
53 | catalog.{{ region }}.cloudformation.publicURL = http://{{ external_ip }}:8000/v1
54 | catalog.{{ region }}.cloudformation.adminURL = http://{{ internal_ip }}:8000/v1
55 | catalog.{{ region }}.cloudformation.internalURL = http://{{ internal_ip }}:8000/v1
56 | catalog.{{ region }}.cloudformation.name = heat-cfn
57 |
58 | #catalog.{{ region }}.share.publicURL = http://{{ external_ip }}:8786/v1/$(tenant_id)s
59 | #catalog.{{ region }}.share.adminURL = http://{{ internal_ip }}:8786/v1/$(tenant_id)s
60 | #catalog.{{ region }}.share.internalURL = http://{{ internal_ip }}:8786/v1/$(tenant_id)s
61 | #catalog.{{ region }}.share.name = manila
62 |
63 | #catalog.{{ region }}.sharev2.publicURL = http://{{ external_ip }}:8786/v2/$(tenant_id)s
64 | #catalog.{{ region }}.sharev2.adminURL = http://{{ internal_ip }}:8786/v2/$(tenant_id)s
65 | #catalog.{{ region }}.sharev2.internalURL = http://{{ internal_ip }}:8786/v2/$(tenant_id)s
66 | #catalog.{{ region }}.sharev2.name = manilav2
67 |
68 | #catalog.{{ region }}.database.publicURL = http://{{ external_ip }}:8779/v1.0/$(tenant_id)s
69 | #catalog.{{ region }}.database.adminURL = http://{{ internal_ip }}:8779/v1.0/$(tenant_id)s
70 | #catalog.{{ region }}.database.internalURL = http://{{ internal_ip }}:8779/v1.0/$(tenant_id)s
71 | #catalog.{{ region }}.database.name = trove
72 |
73 | #catalog.{{ region }}.container-infra.publicURL = http://{{ external_ip }}:9511/v1
74 | #catalog.{{ region }}.container-infra.adminURL = http://{{ internal_ip }}:9511/v1
75 | #catalog.{{ region }}.container-infra.internalURL = http://{{ internal_ip }}:9511/v1
76 | #catalog.{{ region }}.container-infra.name = magnum
77 |
78 |
--------------------------------------------------------------------------------
/roles/08_keystone_population/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart apache2
2 | service: name=apache2 state=restarted
3 |
4 | - name: start keystone
5 | service: name=keystone state=started
6 |
7 |
--------------------------------------------------------------------------------
/roles/08_keystone_population/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Tenants, roles and keystone users creation
2 |
3 | - name: verify if service project has been created
4 | environment: '{{ k3 }}'
5 | command: /usr/bin/openstack project show service
6 | register: result
7 | ignore_errors: True
8 |
9 | - name: ensure service project is created
10 | environment: '{{ k3 }}'
11 | command: /usr/bin/openstack project create --domain Default --description "Service Project" service
12 | when: result is failed
13 |
14 | - name: verify if demo project has been created
15 | environment: '{{k3}}'
16 | command: /usr/bin/openstack project show demo
17 | register: result
18 | ignore_errors: True
19 |
20 | - name: ensure demo project is created
21 | environment: '{{k3}}'
22 | command: /usr/bin/openstack project create --domain Default --description "Demo Project" demo
23 | when: result is failed
24 |
25 | - name: verify if demo user has been created
26 | environment: '{{k3}}'
27 | command: /usr/bin/openstack user show demo
28 | register: result
29 | ignore_errors: True
30 |
31 | - name: ensure demo user is created
32 | environment: '{{k3}}'
33 | command: /usr/bin/openstack user create --domain Default demo --password {{ demo_pass }}
34 | when: result is failed
35 |
36 | - name: verify if user role has been created
37 | environment: '{{k3}}'
38 | command: /usr/bin/openstack role show user
39 | register: result
40 | ignore_errors: True
41 |
42 | - name: ensure user role is created
43 | environment: '{{k3}}'
44 | command: /usr/bin/openstack role create user
45 | when: result is failed
46 |
47 | - name: ensure user role is added to demo user
48 | environment: '{{k3}}'
49 | command: openstack role add --project demo --user demo user
50 |
51 | # Glance
52 | - name: verify if glance user has been created
53 | environment: '{{k3}}'
54 | command: /usr/bin/openstack user show glance
55 | register: result
56 | ignore_errors: True
57 |
58 | - name: ensure glance user is created
59 | environment: '{{k3}}'
60 | command: /usr/bin/openstack user create --domain Default glance --password {{ glance_identity_password }}
61 | when: result is failed
62 |
63 | - name: ensure admin role is added to glance user
64 | environment: '{{k3}}'
65 | command: openstack role add --project service --user glance admin
66 |
67 |
68 |
69 |
70 | # Placement
71 | - name: verify if placement user has been created
72 | environment: '{{k3}}'
73 | command: /usr/bin/openstack user show placement
74 | register: result
75 | ignore_errors: True
76 |
77 | - name: ensure placement user is created
78 | environment: '{{k3}}'
79 | command: /usr/bin/openstack user create --domain Default placement --password {{ placement_identity_password }}
80 | when: result is failed
81 |
82 | - name: ensure admin role is added to placement user
83 | environment: '{{k3}}'
84 | command: openstack role add --project service --user placement admin
85 |
86 | # Nova
87 | - name: verify if nova user has been created
88 | environment: '{{k3}}'
89 | command: /usr/bin/openstack user show nova
90 | register: result
91 | ignore_errors: True
92 |
93 | - name: ensure nova user is created
94 | environment: '{{k3}}'
95 | command: /usr/bin/openstack user create --domain Default nova --password {{ nova_identity_password }}
96 | when: result is failed
97 |
98 | - name: ensure admin role is added to nova user
99 | environment: '{{k3}}'
100 | command: openstack role add --project service --user nova admin
101 |
102 | # Neutron
103 | - name: verify if neutron user has been created
104 | environment: '{{k3}}'
105 | command: /usr/bin/openstack user show neutron
106 | register: result
107 | ignore_errors: True
108 |
109 | - name: ensure neutron user is created
110 | environment: '{{k3}}'
111 | command: /usr/bin/openstack user create --domain Default neutron --password {{ neutron_identity_password }}
112 | when: result is failed
113 |
114 | - name: ensure admin role is added to neutron user
115 | environment: '{{k3}}'
116 | command: openstack role add --project service --user neutron admin
117 |
118 | # Cinder
119 | - name: verify if cinder user has been created
120 | environment: '{{k3}}'
121 | command: /usr/bin/openstack user show cinder
122 | register: result
123 | ignore_errors: True
124 |
125 | - name: ensure cinder user is created
126 | environment: '{{k3}}'
127 | command: /usr/bin/openstack user create --domain Default cinder --password {{ cinder_identity_password }}
128 | when: result is failed
129 |
130 | - name: ensure admin role is added to cinder user
131 | environment: '{{k3}}'
132 | command: openstack role add --project service --user cinder admin
133 |
134 |
135 | # Heat
136 | - name: ensure heat user is created
137 | environment: '{{k3}}'
138 | command: /usr/bin/openstack user create --domain Default heat --password {{ heat_identity_password }}
139 | when: result is failed
140 |
141 | - name: ensure admin role is added to heat user
142 | environment: '{{k3}}'
143 | command: openstack role add --project service --user heat admin
144 |
145 | - name: verify if heat domain has been created
146 | environment: '{{k3}}'
147 | command: /usr/bin/openstack domain show heat
148 | register: result
149 | ignore_errors: True
150 |
151 | - name: ensure heat domain is created
152 | environment: '{{k3}}'
153 | command: /usr/bin/openstack domain create --description "Stack projects and users" heat
154 | when: result is failed
155 |
156 | - name: verify if heat_domain_admin user has been created
157 | environment: '{{k3}}'
158 | command: /usr/bin/openstack user show heat_domain_admin
159 | register: result
160 | ignore_errors: True
161 |
162 | - name: ensure heat_domain_admin user is created
163 | environment: '{{k3}}'
164 | command: /usr/bin/openstack user create --domain heat heat_domain_admin --password {{ heat_domain_admin_identity_password }}
165 | when: result is failed
166 |
167 | - name: ensure admin role is added to heat_domain_admin user
168 | environment: '{{k3}}'
169 | command: /usr/bin/openstack role add --domain heat --user-domain heat --user heat_domain_admin admin
170 |
171 | - name: verify if heat_stack_owner role has been created
172 | environment: '{{k3}}'
173 | command: /usr/bin/openstack role show heat_stack_owner
174 | register: result
175 | ignore_errors: True
176 |
177 | - name: ensure heat_stack_owner role is created
178 | environment: '{{k3}}'
179 | command: /usr/bin/openstack role create heat_stack_owner
180 | when: result is failed
181 |
182 | - name: ensure heat_stack_owner role is added to demo user
183 | environment: '{{k3}}'
184 | command: /usr/bin/openstack role add --project demo --user demo heat_stack_owner
185 |
186 | - name: verify if heat_stack_user role has been created
187 | environment: '{{k3}}'
188 | command: /usr/bin/openstack role show heat_stack_user
189 | register: result
190 | ignore_errors: True
191 |
192 | - name: ensure heat_stack_user role is created
193 | environment: '{{k3}}'
194 | command: /usr/bin/openstack role create heat_stack_user
195 | when: result is failed
196 |
197 | # Manila
198 | #- name: verify if manila user has been created
199 | # environment: '{{k3}}'
200 | # command: /usr/bin/openstack user show manila
201 | # register: result
202 | # ignore_errors: True
203 | #
204 | #- name: ensure manila user is created
205 | # environment: '{{k3}}'
206 | # command: /usr/bin/openstack user create --domain Default manila --password {{ manila_identity_password }}
207 | # when: result is failed
208 | #
209 | #- name: ensure admin role is added to manila user
210 | # environment: '{{k3}}'
211 | # command: openstack role add --project service --user manila admin
212 |
213 |
214 | # Trove
215 | #- name: verify if trove user has been created
216 | # environment: '{{k3}}'
217 | # command: /usr/bin/openstack user show trove
218 | # register: result
219 | # ignore_errors: True
220 | #
221 | #- name: ensure trove user is created
222 | # environment: '{{k3}}'
223 | # command: /usr/bin/openstack user create --domain Default trove --password {{ trove_identity_password }}
224 | # when: result is failed
225 | #
226 | #- name: ensure admin role is added to trove user
227 | # environment: '{{k3}}'
228 | # command: openstack role add --project service --user trove admin
229 |
230 | # Magnum
231 | #- name: verify is magnum user has been created
232 | # environment: '{{k3}}'
233 | # command: /usr/bin/openstack user show magnum
234 | # register: result
235 | # ignore_errors: True
236 | #
237 | #- name: ensure magnum user is created
238 | # environment: '{{k3}}'
239 | # command: /usr/bin/openstack user create --domain Default magnum --password {{ magnum_identity_password }}
240 | # when: result is failed
241 | #
242 | #- name: ensure admin role is added to magnum user
243 | # environment: '{{k3}}'
244 | # command: openstack role add --project service --user magnum admin
245 |
246 | - name: ensure openrc admin file is created in root home directory
247 | template: >-
248 | src=root/openrc
249 | dest=/root/admin_openrc.sh
250 | owner=root
251 | group=root
252 | mode=600
253 |
254 | - name: ensure openrc demo file is created in root home directory
255 | template: >-
256 | src=root/demo_openrc
257 | dest=/root/demo_openrc.sh
258 | owner=root
259 | group=root
260 | mode=600
261 |
262 |
--------------------------------------------------------------------------------
/roles/08_keystone_population/templates/root/demo_openrc:
--------------------------------------------------------------------------------
1 | export OS_PROJECT_DOMAIN_NAME=Default
2 | export OS_USER_DOMAIN_NAME=Default
3 | export OS_PROJECT_NAME=demo
4 | export OS_USERNAME=demo
5 | export OS_PASSWORD='{{ demo_pass }}'
6 | export OS_AUTH_URL=http://{{ internal_ip }}:5000/v3
7 | export OS_IDENTITY_API_VERSION=3
8 | export OS_IMAGE_API_VERSION=2
--------------------------------------------------------------------------------
/roles/08_keystone_population/templates/root/openrc:
--------------------------------------------------------------------------------
1 | export OS_PROJECT_DOMAIN_NAME=Default
2 | export OS_USER_DOMAIN_NAME=Default
3 | export OS_PROJECT_NAME=admin
4 | export OS_USERNAME=admin
5 | export OS_PASSWORD='{{ admin_pass }}'
6 | export OS_AUTH_URL=http://{{ internal_ip }}:5000/v3
7 | export OS_IDENTITY_API_VERSION=3
8 | export OS_IMAGE_API_VERSION=2
--------------------------------------------------------------------------------
/roles/09_glanceserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart glance-api
2 | service: name=glance-api state=restarted
3 |
--------------------------------------------------------------------------------
/roles/09_glanceserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure glance is installed
2 | apt: name=glance
3 |
4 | - name: ensure glance database connection is configured
5 | ini_file:
6 | path: /etc/glance/glance-api.conf
7 | section: database
8 | option: connection
9 | value: mysql+pymysql://glance:{{ glance_db_password }}@{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}/glance
10 | notify:
11 | - restart glance-api
12 |
13 | - name: ensure keystone_authtoken is configured
14 | ini_file:
15 | path: /etc/glance/glance-api.conf
16 | section: keystone_authtoken
17 | option: "{{ item.option }}"
18 | value: "{{ item.value }}"
19 | loop:
20 | - { option: "www_authenticate_uri", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
21 | - { option: "auth_url", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
22 | - { option: "memcached_servers", value: '{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:11211' }
23 | - { option: "auth_type", value: password }
24 | - { option: "project_domain_name", value: Default}
25 | - { option: "user_domain_name", value: Default}
26 | - { option: "project_name", value: service}
27 | - { option: "username", value: glance}
28 | - { option: "password", value: "{{ glance_identity_password }}" }
29 | - { option: "region", value: "{{ region }}" }
30 | - { option: "region_name", value: "{{ region }}" }
31 | notify:
32 | - restart glance-api
33 |
34 | - name: ensure paste_deploy is set to keystone
35 | ini_file:
36 | path: /etc/glance/glance-api.conf
37 | section: paste_deploy
38 | option: flavor
39 | value: keystone
40 | notify:
41 | - restart glance-api
42 |
43 | - name: ensure keystone_authtoken is configured
44 | ini_file:
45 | path: /etc/glance/glance-api.conf
46 | section: glance_store
47 | option: "{{ item.option }}"
48 | value: "{{ item.value }}"
49 | loop:
50 | - { option: "stores", value: 'file,http' }
51 | - { option: "default_store", value: file }
52 | - { option: "filesystem_store_datadir", value: /var/lib/glance/images/ }
53 | notify:
54 | - restart glance-api
55 |
56 | - name: ensure glance db is initialized
57 | command: /usr/bin/glance-manage db_sync
58 | notify:
59 | - restart glance-api
60 |
61 |
--------------------------------------------------------------------------------
/roles/10_placement/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart placement
2 | service: name=placement-api state=restarted
3 |
--------------------------------------------------------------------------------
/roles/10_placement/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # quitar apache2
2 | - name: ensure placement-api is installed
3 | apt: name={{ item }}
4 | loop:
5 | - placement-api
6 |
7 | - name: ensure placement database connection is configured
8 | ini_file:
9 | path: /etc/placement/placement.conf
10 | section: placement_database
11 | option: connection
12 | value: mysql+pymysql://placement:{{ placement_db_password }}@{{ internal_ip }}/placement
13 | notify:
14 | - restart placement
15 |
16 | - name: ensure auth_strategy is set to keystone
17 | ini_file:
18 | path: /etc/placement/placement.conf
19 | section: api
20 | option: auth_strategy
21 | value: keystone
22 | notify:
23 | - restart placement
24 |
25 | - name: ensure keystone_authtoken is configured
26 | ini_file:
27 | path: /etc/placement/placement.conf
28 | section: keystone_authtoken
29 | option: "{{ item.option }}"
30 | value: "{{ item.value }}"
31 | loop:
32 | - { option: "www_authenticate_uri", value: 'http://{{ internal_ip }}:5000' }
33 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000' }
34 | - { option: "memcached_servers", value: '{{ internal_ip }}:11211' }
35 | - { option: "auth_type", value: password }
36 | - { option: "project_domain_name", value: Default}
37 | - { option: "user_domain_name", value: Default}
38 | - { option: "project_name", value: service}
39 | - { option: "username", value: placement}
40 | - { option: "password", value: "{{ placement_identity_password }}" }
41 | - { option: "region", value: "{{ region }}" }
42 | - { option: "region_name", value: "{{ region }}" }
43 | - { option: "service_token_roles_required", value: "true" }
44 | notify:
45 | - restart placement
46 |
47 |
48 |
49 | - name: ensure placement db is initialized
50 | command: /usr/bin/placement-manage db sync
51 | notify:
52 | - restart placement
53 |
54 |
--------------------------------------------------------------------------------
/roles/11_novaserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart nova-services
2 | service: name={{ item }} state=restarted enabled=yes
3 | loop:
4 | - nova-api
5 | - nova-api-metadata
6 | - nova-scheduler
7 | - nova-conductor
8 | - nova-spicehtml5proxy
9 | - nova-serialproxy
10 |
11 |
--------------------------------------------------------------------------------
/roles/11_novaserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure nova packages are installed
2 | apt: name={{ item }}
3 | loop:
4 | - nova-api
5 | - nova-conductor
6 | - nova-scheduler
7 | - nova-consoleproxy
8 |
9 |
10 | - name: ensure nova_api database connections is configured
11 | ini_file:
12 | path: /etc/nova/nova.conf
13 | section: api_database
14 | option: connection
15 | value: mysql+pymysql://nova:{{ nova_db_password }}@{{ internal_ip }}/nova_api
16 | notify:
17 | - restart nova-services
18 |
19 | - name: ensure nova database connections is configured
20 | ini_file:
21 | path: /etc/nova/nova.conf
22 | section: database
23 | option: connection
24 | value: mysql+pymysql://nova:{{ nova_db_password }}@{{ internal_ip }}/nova
25 | notify:
26 | - restart nova-services
27 |
28 | - name: set default section options
29 | ini_file:
30 | path: /etc/nova/nova.conf
31 | section: DEFAULT
32 | option: "{{ item.option }}"
33 | value: "{{ item.value }}"
34 | loop:
35 | - { option: "transport_url",
36 | value: 'rabbit://{{ rabbit_user }}:{{ rabbit_password }}@{{ internal_ip }}:5672/'}
37 | - { option: "my_ip", value: '{{ internal_ip }}' }
38 | notify:
39 | - restart nova-services
40 |
41 |
42 | - name: configure keystone_authtoken section
43 | ini_file:
44 | path: /etc/nova/nova.conf
45 | section: keystone_authtoken
46 | option: "{{ item.option }}"
47 | value: "{{ item.value }}"
48 | loop:
49 | - { option: "www_authenticate_uri", value: 'http://{{ internal_ip }}:5000' }
50 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000' }
51 | - { option: "memcached_servers", value: '{{ internal_ip }}:11211' }
52 | - { option: "auth_type", value: password }
53 | - { option: "project_domain_name", value: Default}
54 | - { option: "user_domain_name", value: Default}
55 | - { option: "project_name", value: service}
56 | - { option: "username", value: nova}
57 | - { option: "password", value: "{{ nova_identity_password }}" }
58 | - { option: "region", value: "{{ region }}" }
59 | - { option: "region_name", value: "{{ region }}" }
60 | # - { option: "service_token_roles_required", value: true } # Hay que mirar esta opción, no aparece en la documentación
61 | notify:
62 | - restart nova-services
63 |
64 | - name: ensure auth_strategy is set to keystone
65 | ini_file:
66 | path: /etc/nova/nova.conf
67 | section: api
68 | option: auth_strategy
69 | value: keystone
70 | notify:
71 | - restart nova-services
72 |
73 |
74 | - name: configure spice section
75 | ini_file:
76 | path: /etc/nova/nova.conf
77 | section: spice
78 | option: "{{ item.option }}"
79 | value: "{{ item.value }}"
80 | loop:
81 | - { option: "enabled", value: "true" }
82 | - { option: "server_listen", value: '$my_ip' }
83 | - { option: "server_proxyclient_address", value: '$my_ip' }
84 | - { option: "html5proxy_base_url", value: "https://{{ controller_fqdn }}:6082/spice_auto.html" }
85 | #- { option: "html5proxy_base_url", value: "http://172.22.121.1:6082/spice_auto.html" }
86 | - { option: "html5proxy_host", value: "0.0.0.0" }
87 | - { option: "html5proxy_port", value: "6082" }
88 | notify:
89 | - restart nova-services
90 |
91 | - name: configure glance section
92 | ini_file:
93 | path: /etc/nova/nova.conf
94 | section: glance
95 | option: api_servers
96 | value: 'http://{{ hostvars[groups["storage_nodes"][0]]["internal_ip"] }}:9292' # No es internal_ip, es la dirección de glance que puede estar en otro nodo
97 | notify:
98 | - restart nova-services
99 |
100 | - name: configure oslo_concurrency section
101 | ini_file:
102 | path: /etc/nova/nova.conf
103 | section: oslo_concurrency
104 | option: lock_path
105 | value: /var/lib/nova/tmp
106 | notify:
107 | - restart nova-services
108 |
109 | - name: configure placement section
110 | ini_file:
111 | path: /etc/nova/nova.conf
112 | section: placement
113 | option: "{{ item.option }}"
114 | value: "{{ item.value }}"
115 | loop:
116 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000/v3' }
117 | - { option: "auth_type", value: password }
118 | - { option: "project_domain_name", value: Default}
119 | - { option: "user_domain_name", value: Default}
120 | - { option: "project_name", value: service}
121 | - { option: "username", value: placement}
122 | - { option: "password", value: "{{ placement_identity_password }}" }
123 | - { option: "region", value: "{{ region }}" }
124 | - { option: "region_name", value: "{{ region }}" }
125 | notify:
126 | - restart nova-services
127 |
128 | - name: configure neutron section
129 | ini_file:
130 | path: /etc/nova/nova.conf
131 | section: neutron
132 | option: "{{ item.option }}"
133 | value: "{{ item.value }}"
134 | loop:
135 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000' }
136 | - { option: "auth_type", value: password }
137 | - { option: "project_domain_name", value: Default}
138 | - { option: "user_domain_name", value: Default}
139 | - { option: "project_name", value: service}
140 | - { option: "username", value: neutron}
141 | - { option: "password", value: "{{ neutron_identity_password }}" }
142 | - { option: "region", value: "{{ region }}" }
143 | - { option: "region_name", value: "{{ region }}" }
144 | - { option: "metadata_proxy_shared_secret", value: "{{ shared_secret }}" }
145 | notify:
146 | - restart nova-services
147 |
148 | - name: configure cinder section
149 | ini_file:
150 | path: /etc/nova/nova.conf
151 | section: cinder
152 | option: os_region_name
153 | value: "{{ region }}"
154 |
155 | - name: populate nova-api db
156 | command: /usr/bin/nova-manage api_db sync
157 |
158 | - name: register the cell0 db
159 | command: /usr/bin/nova-manage cell_v2 map_cell0
160 |
161 | # Errors ignored for idempotency
162 | - name: create the cell1
163 | command: /usr/bin/nova-manage cell_v2 create_cell --name=cell1
164 | ignore_errors: True
165 |
166 | - name: populate nova db
167 | command: /usr/bin/nova-manage db sync
168 |
169 |
--------------------------------------------------------------------------------
/roles/12_novacompute/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart nova-compute
2 | service: name=nova-compute state=restarted
3 |
4 |
--------------------------------------------------------------------------------
/roles/12_novacompute/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure nova-compute is installed
2 | apt: name=nova-compute
3 |
4 | - name: set default section options
5 | ini_file:
6 | path: /etc/nova/nova.conf
7 | section: DEFAULT
8 | option: "{{ item.option }}"
9 | value: "{{ item.value }}"
10 | loop:
11 | - { option: "transport_url",
12 | value: 'rabbit://{{ rabbit_user }}:{{ rabbit_password }}@{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5672/'}
13 | - { option: "my_ip", value: "{{ internal_ip }}" }
14 |
15 | notify:
16 | - restart nova-compute
17 |
18 | - name: configure keystone_authtoken section
19 | ini_file:
20 | path: /etc/nova/nova.conf
21 | section: keystone_authtoken
22 | option: "{{ item.option }}"
23 | value: "{{ item.value }}"
24 | loop:
25 | - { option: "www_authenticate_uri", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000/' }
26 | - { option: "auth_url", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000/' }
27 | - { option: "memcached_servers", value: '{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:11211' }
28 | - { option: "auth_type", value: password }
29 | - { option: "project_domain_name", value: Default}
30 | - { option: "user_domain_name", value: Default}
31 | - { option: "project_name", value: service}
32 | - { option: "username", value: nova}
33 | - { option: "password", value: "{{ nova_identity_password }}" }
34 | - { option: "region", value: "{{ region }}" }
35 | - { option: "region_name", value: "{{ region }}" }
36 | notify:
37 | - restart nova-compute
38 |
39 | - name: ensure auth_strategy is set to keystone
40 | ini_file:
41 | path: /etc/nova/nova.conf
42 | section: api
43 | option: auth_strategy
44 | value: keystone
45 | notify:
46 | - restart nova-compute
47 |
48 | - name: configure vnc section
49 | ini_file:
50 | path: /etc/nova/nova.conf
51 | section: vnc
52 | option: "enabled"
53 | value: "false"
54 |
55 | - name: configure spice section
56 | ini_file:
57 | path: /etc/nova/nova.conf
58 | section: spice
59 | option: "{{ item.option }}"
60 | value: "{{ item.value }}"
61 | loop:
62 | - { option: "enabled", value: "True" }
63 | - { option: "server_listen", value: '0.0.0.0' }
64 | - { option: "server_proxyclient_address", value: '$my_ip' }
65 | - { option: "html5proxy_base_url", value: "http://{{ controller_fqdn }}:6082/spice_auto.html" }
66 | #- { option: "html5proxy_base_url", value: "http://172.22.121.1:6082/spice_auto.html" }
67 | - { option: "html5proxy_host", value: "0.0.0.0" }
68 | - { option: "html5proxy_port", value: "6082" }
69 | - { option: "keymap", value: "es-es" }
70 | notify:
71 | - restart nova-compute
72 |
73 | - name: configure glance section
74 | ini_file:
75 | path: /etc/nova/nova.conf
76 | section: glance
77 | option: api_servers
78 | value: 'http://{{ hostvars[groups["storage_nodes"][0]]["internal_ip"] }}:9292'
79 | notify:
80 | - restart nova-compute
81 |
82 | - name: configure oslo_concurrency section
83 | ini_file:
84 | path: /etc/nova/nova.conf
85 | section: oslo_concurrency
86 | option: lock_path
87 | value: /var/lib/nova/tmp
88 | notify:
89 | - restart nova-compute
90 |
91 | - name: configure placement section
92 | ini_file:
93 | path: /etc/nova/nova.conf
94 | section: placement
95 | option: "{{ item.option }}"
96 | value: "{{ item.value }}"
97 | loop:
98 | - { option: "auth_url", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000/v3' }
99 | - { option: "auth_type", value: password }
100 | - { option: "project_domain_name", value: Default}
101 | - { option: "user_domain_name", value: Default}
102 | - { option: "project_name", value: service}
103 | - { option: "username", value: placement}
104 | - { option: "password", value: "{{ placement_identity_password }}" }
105 | - { option: "region", value: "{{ region }}" }
106 | - { option: "region_name", value: "{{ region }}" }
107 | notify:
108 | - restart nova-compute
109 |
110 | - name: configure neutron section
111 | ini_file:
112 | path: /etc/nova/nova.conf
113 | section: neutron
114 | option: "{{ item.option }}"
115 | value: "{{ item.value }}"
116 | loop:
117 | - { option: "auth_url", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
118 | - { option: "auth_type", value: password }
119 | - { option: "project_domain_name", value: Default}
120 | - { option: "user_domain_name", value: Default}
121 | - { option: "project_name", value: service}
122 | - { option: "username", value: neutron}
123 | - { option: "password", value: "{{ neutron_identity_password }}" }
124 | - { option: "region", value: "{{ region }}" }
125 | - { option: "region_name", value: "{{ region }}" }
126 | - { option: "service_metadata_proxy", value: 'true' }
127 | - { option: "metadata_proxy_shared_secret", value: "{{ shared_secret }}" }
128 | notify:
129 | - restart nova-compute
130 |
131 | - name: configure cinder section
132 | ini_file:
133 | path: /etc/nova/nova.conf
134 | section: cinder
135 | option: "os_region_name"
136 | value: "{{ region }}"
137 | notify:
138 | - restart nova-compute
139 |
--------------------------------------------------------------------------------
/roles/13_novadiscover/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: Discover compute hosts
2 | shell: nova-manage cell_v2 discover_hosts
--------------------------------------------------------------------------------
/roles/14_neutronserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart neutron-services
2 | service: name={{ item }} state=restarted
3 | loop:
4 | - neutron-api
5 | #- neutron-metadata-agent
6 | #- neutron-l3-agent
7 |
--------------------------------------------------------------------------------
/roles/14_neutronserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure neutron server and neutron-plugin-ml2 are installed
2 | apt: name={{ item }}
3 | loop:
4 | - neutron-server
5 | - neutron-plugin-ml2
6 | #- neutron-linuxbridge-agent
7 | #- neutron-l3-agent
8 | #- neutron-dhcp-agent
9 | #- neutron-metadata-agent
10 |
11 | - name: ensure neutron database connections is configured
12 | ini_file:
13 | path: /etc/neutron/neutron.conf
14 | section: database
15 | option: connection
16 | value: mysql+pymysql://neutron:{{ neutron_db_password }}@{{ internal_ip }}/neutron
17 | notify:
18 | - restart neutron-services
19 |
20 | - name: set default section options
21 | ini_file:
22 | path: /etc/neutron/neutron.conf
23 | section: DEFAULT
24 | option: "{{ item.option }}"
25 | value: "{{ item.value }}"
26 | loop:
27 | - { option: "transport_url",
28 | value: 'rabbit://{{ rabbit_user }}:{{ rabbit_password }}@{{ internal_ip }}:5672/'}
29 | - { option: "core_plugin", value: ml2 }
30 | - { option: "service_plugins", value: router }
31 | - { option: "allow_overlapping_ips", value: "true" }
32 | - { option: "notify_nova_on_port_status_changes", value: "true" } # No se hay que ponerlo
33 | - { option: "notify_nova_on_port_data_changes", value: "true" } # No se hay que ponerlo
34 | - { option: "auth_strategy", value: keystone }
35 | notify:
36 | - restart neutron-services
37 |
38 | - name: unset interface_driver option
39 | ini_file:
40 | path: /etc/neutron/neutron.conf
41 | section: DEFAULT
42 | option: "interface_driver"
43 | state: absent
44 | notify:
45 | - restart neutron-services
46 |
47 | - name: configure keystone_authtoken section
48 | ini_file:
49 | path: /etc/neutron/neutron.conf
50 | section: keystone_authtoken
51 | option: "{{ item.option }}"
52 | value: "{{ item.value }}"
53 | loop:
54 | - { option: "www_authenticate_uri", value: 'http://{{ internal_ip }}:5000' }
55 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000' }
56 | - { option: "memcached_servers", value: '{{ internal_ip }}:11211' }
57 | - { option: "auth_type", value: password }
58 | - { option: "project_domain_name", value: Default}
59 | - { option: "user_domain_name", value: Default}
60 | - { option: "project_name", value: service}
61 | - { option: "username", value: neutron}
62 | - { option: "password", value: "{{ neutron_identity_password }}" }
63 | - { option: "region", value: "{{ region }}" }
64 | - { option: "region_name", value: "{{ region }}" }
65 | #- { option: "service_token_roles_required", value: "true" }
66 | notify:
67 | - restart neutron-services
68 |
69 | - name: configure oslo_concurrency section
70 | ini_file:
71 | path: /etc/neutron/neutron.conf
72 | section: oslo_concurrency
73 | option: lock_path
74 | value: /var/lib/neutron/tmp
75 | notify:
76 | - restart neutron-services
77 |
78 | - name: configure nova section
79 | ini_file:
80 | path: /etc/neutron/neutron.conf
81 | section: nova
82 | option: "{{ item.option }}"
83 | value: "{{ item.value }}"
84 | loop:
85 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000' }
86 | - { option: "auth_type", value: password }
87 | - { option: "project_domain_name", value: Default}
88 | - { option: "user_domain_name", value: Default}
89 | - { option: "project_name", value: service}
90 | - { option: "username", value: nova}
91 | - { option: "password", value: "{{ nova_identity_password }}" }
92 | - { option: "region", value: "{{ region }}" }
93 | - { option: "region_name", value: "{{ region }}" }
94 | notify:
95 | - restart neutron-services
96 |
97 | - name: configure ml2 plugin
98 | ini_file:
99 | path: /etc/neutron/plugins/ml2/ml2_conf.ini
100 | section: ml2
101 | option: "{{ item.option }}"
102 | value: "{{ item.value }}"
103 | loop:
104 | - { option: "type_drivers", value: "flat,vlan,vxlan" }
105 | - { option: "tenant_network_types", value: vxlan }
106 | - { option: "mechanism_drivers", value: "linuxbridge,l2population" }
107 | - { option: "extension_drivers", value: port_security }
108 | - { option: "flat_networks", value: provider }
109 | notify:
110 | - restart neutron-services
111 |
112 | - name: configure ml2 plugin (flat_networks)
113 | ini_file:
114 | path: /etc/neutron/plugins/ml2/ml2_conf.ini
115 | section: ml2_type_flat
116 | option: flat_networks
117 | value: 'provider'
118 | notify:
119 | - restart neutron-services
120 |
121 |
122 |
123 | - name: configure ml2 plugin (vni_ranges)
124 | ini_file:
125 | path: /etc/neutron/plugins/ml2/ml2_conf.ini
126 | section: ml2_type_vxlan
127 | option: vni_ranges
128 | value: '1:1000'
129 | notify:
130 | - restart neutron-services
131 |
132 | - name: configure ml2 plugin (enable_ipset)
133 | ini_file:
134 | path: /etc/neutron/plugins/ml2/ml2_conf.ini
135 | section: securitygroup
136 | option: enable_ipset
137 | value: 'True'
138 | notify:
139 | - restart neutron-services
140 |
141 |
142 | # Needed when /proc/sys/net/bridge is missing
143 | - name: load br_netfilter kernel module
144 | modprobe:
145 | name: br_netfilter
146 | state: present
147 |
148 | - name: set net.bridge.bridge-nf-call-iptables
149 | sysctl:
150 | name: net.bridge.bridge-nf-call-iptables
151 | value: '1'
152 | reload: yes
153 |
154 | - name: set net.bridge.bridge-nf-call-ip6tables
155 | sysctl:
156 | name: net.bridge.bridge-nf-call-ip6tables
157 | value: '1'
158 | reload: yes
159 |
160 |
161 | - name: ensure neutron db is initialized
162 | command: neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
163 | notify:
164 | - restart neutron-services
165 |
--------------------------------------------------------------------------------
/roles/15_neutronnetwork/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart neutron-services
2 | service: name={{ item }} state=restarted
3 | with_items:
4 | - neutron-l3-agent
5 | - neutron-linuxbridge-agent
--------------------------------------------------------------------------------
/roles/15_neutronnetwork/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure neutron plugins are installed
2 | apt: name={{ item }}
3 | loop:
4 | #- neutron-server
5 | #- neutron-plugin-ml2
6 | - neutron-linuxbridge-agent
7 | - neutron-l3-agent
8 | #- neutron-dhcp-agent
9 | #- neutron-metadata-agent
10 |
11 | - name: ensure neutron database connections is configured
12 | ini_file:
13 | path: /etc/neutron/neutron.conf
14 | section: database
15 | option: connection
16 | value: mysql+pymysql://neutron:{{ neutron_db_password }}@{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}/neutron
17 | notify:
18 | - restart neutron-services
19 |
20 | - name: set default section options
21 | ini_file:
22 | path: /etc/neutron/neutron.conf
23 | section: DEFAULT
24 | option: "{{ item.option }}"
25 | value: "{{ item.value }}"
26 | loop:
27 | - { option: "transport_url",
28 | value: 'rabbit://{{ rabbit_user }}:{{ rabbit_password }}@{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5672/'}
29 | - { option: "core_plugin", value: ml2 }
30 | - { option: "service_plugins", value: router }
31 | - { option: "allow_overlapping_ips", value: "true" }
32 | - { option: "notify_nova_on_port_status_changes", value: "true" }
33 | - { option: "notify_nova_on_port_data_changes", value: "true" }
34 | - { option: "auth_strategy", value: keystone }
35 | notify:
36 | - restart neutron-services
37 |
38 | - name: unset interface_driver option
39 | ini_file:
40 | path: /etc/neutron/neutron.conf
41 | section: DEFAULT
42 | option: "interface_driver"
43 | state: absent
44 | notify:
45 | - restart neutron-services
46 |
47 | - name: configure keystone_authtoken section
48 | ini_file:
49 | path: /etc/neutron/neutron.conf
50 | section: keystone_authtoken
51 | option: "{{ item.option }}"
52 | value: "{{ item.value }}"
53 | loop:
54 | - { option: "www_authenticate_uri", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
55 | - { option: "auth_url", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
56 | - { option: "memcached_servers", value: '{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:11211' }
57 | - { option: "auth_type", value: password }
58 | - { option: "project_domain_name", value: Default}
59 | - { option: "user_domain_name", value: Default}
60 | - { option: "project_name", value: service}
61 | - { option: "username", value: neutron}
62 | - { option: "password", value: "{{ neutron_identity_password }}" }
63 | - { option: "region", value: "{{ region }}" }
64 | - { option: "region_name", value: "{{ region }}" }
65 | #- { option: "service_token_roles_required", value: "true" }
66 | notify:
67 | - restart neutron-services
68 |
69 | ########
70 | # Linux Bridge
71 | ########
72 |
73 | - name: configure the Linux bridge agent. linux_bridge section
74 | ini_file:
75 | path: /etc/neutron/plugins/ml2/linuxbridge_agent.ini
76 | section: linux_bridge
77 | option: "physical_interface_mappings"
78 | value: "provider:{{ external_interface }}"
79 | notify:
80 | - restart neutron-services
81 |
82 | - name: configure the Linux bridge agent. vxlan section
83 | ini_file:
84 | path: /etc/neutron/plugins/ml2/linuxbridge_agent.ini
85 | section: vxlan
86 | option: "{{ item.option }}"
87 | value: "{{ item.value }}"
88 | loop:
89 | - { option: "enable_vxlan", value: "true" }
90 | - { option: "local_ip", value: "{{ internal_ip }}" }
91 | - { option: "l2_population", value: "true" }
92 | notify:
93 | - restart neutron-services
94 |
95 | - name: configure the Linux bridge agent. securitygroup section
96 | ini_file:
97 | path: /etc/neutron/plugins/ml2/linuxbridge_agent.ini
98 | section: securitygroup
99 | option: "{{ item.option }}"
100 | value: "{{ item.value }}"
101 | loop:
102 | - { option: "enable_security_group", value: "true" }
103 | - { option: "firewall_driver", value: neutron.agent.linux.iptables_firewall.IptablesFirewallDriver }
104 | notify:
105 | - restart neutron-services
106 |
107 | ########
108 | # Layer-3
109 | ########
110 |
111 |
112 | - name: configure the layer 3 agent
113 | ini_file:
114 | path: /etc/neutron/l3_agent.ini
115 | section: DEFAULT
116 | option: "interface_driver"
117 | value: linuxbridge
118 | notify:
119 | - restart neutron-services
120 |
121 |
--------------------------------------------------------------------------------
/roles/16_neutroncompute/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart neutron-services
2 | service: name={{ item }} state=restarted
3 | loop:
4 | - neutron-linuxbridge-agent
5 |
--------------------------------------------------------------------------------
/roles/16_neutroncompute/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure neutron-linuxbridge-agent. dhcp-agent, metadata-agent is installed
2 | apt: name={{ item }}
3 | loop:
4 | #- neutron-server
5 | #- neutron-plugin-ml2
6 | - neutron-linuxbridge-agent
7 | #- neutron-l3-agent
8 | - neutron-dhcp-agent
9 | - neutron-metadata-agent
10 |
11 | - name: set default section options
12 | ini_file:
13 | path: /etc/neutron/neutron.conf
14 | section: DEFAULT
15 | option: "{{ item.option }}"
16 | value: "{{ item.value }}"
17 | loop:
18 | - { option: "transport_url",
19 | value: 'rabbit://{{ rabbit_user }}:{{ rabbit_password }}@{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5672/'}
20 | - { option: "auth_strategy", value: keystone }
21 | notify:
22 | - restart neutron-services
23 |
24 | - name: unset interface_driver option
25 | ini_file:
26 | path: /etc/neutron/neutron.conf
27 | section: DEFAULT
28 | option: "interface_driver"
29 | state: absent
30 | notify:
31 | - restart neutron-services
32 |
33 | - name: unset connection option
34 | ini_file:
35 | path: /etc/neutron/neutron.conf
36 | section: database
37 | option: "connection"
38 | state: absent
39 | notify:
40 | - restart neutron-services
41 |
42 | - name: configure keystone_authtoken section
43 | ini_file:
44 | path: /etc/neutron/neutron.conf
45 | section: keystone_authtoken
46 | option: "{{ item.option }}"
47 | value: "{{ item.value }}"
48 | loop:
49 | - { option: "www_authenticate_uri", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
50 | - { option: "auth_url", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
51 | - { option: "memcached_servers", value: '{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:11211' }
52 | - { option: "auth_type", value: password }
53 | - { option: "project_domain_name", value: Default}
54 | - { option: "user_domain_name", value: Default}
55 | - { option: "project_name", value: service}
56 | - { option: "username", value: neutron}
57 | - { option: "password", value: "{{ neutron_identity_password }}" }
58 | - { option: "region", value: "{{ region }}" }
59 | - { option: "region_name", value: "{{ region }}" }
60 | notify:
61 | - restart neutron-services
62 |
63 | - name: configure oslo_concurrency section
64 | ini_file:
65 | path: /etc/neutron/neutron.conf
66 | section: oslo_concurrency
67 | option: lock_path
68 | value: /var/lib/neutron/tmp
69 | notify:
70 | - restart neutron-services
71 |
72 |
73 | ########
74 | # Linux Bridge
75 | ########
76 |
77 |
78 | - name: configure the Linux bridge agent. vxlan section
79 | ini_file:
80 | path: /etc/neutron/plugins/ml2/linuxbridge_agent.ini
81 | section: vxlan
82 | option: "{{ item.option }}"
83 | value: "{{ item.value }}"
84 | loop:
85 | - { option: "enable_vxlan", value: "true" }
86 | - { option: "local_ip", value: "{{ internal_ip }}" }
87 | - { option: "l2_population", value: "true" }
88 | notify:
89 | - restart neutron-services
90 |
91 |
92 |
93 |
94 |
95 | ###########
96 | # DHCP
97 | ###########
98 |
99 |
100 | - name: configure the DHCP agent
101 | ini_file:
102 | path: /etc/neutron/dhcp_agent.ini
103 | section: DEFAULT
104 | option: "{{ item.option }}"
105 | value: "{{ item.value }}"
106 | loop:
107 | - { option: "interface_driver", value: linuxbridge }
108 | - { option: "dhcp_driver", value: neutron.agent.linux.dhcp.Dnsmasq }
109 | - { option: "enable_isolated_metadata", value: "true" }
110 | - { option: "force_metadata", value: "true" }
111 | notify:
112 | - restart neutron-services
113 |
114 | ###########
115 | # METADATA
116 | ###########
117 |
118 |
119 | - name: configure the metadata agent
120 | ini_file:
121 | path: /etc/neutron/metadata_agent.ini
122 | section: DEFAULT
123 | option: "{{ item.option }}"
124 | value: "{{ item.value }}"
125 | loop:
126 | - { option: "nova_metadata_host", value: '{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}' }
127 | - { option: "metadata_proxy_shared_secret", value: "{{ shared_secret }}" }
128 | notify:
129 | - restart neutron-services
130 |
131 |
132 | # Needed when /proc/sys/net/bridge is missing
133 | - name: load br_netfilter kernel module
134 | modprobe:
135 | name: br_netfilter
136 | state: present
137 |
138 | - name: set net.bridge.bridge-nf-call-iptables
139 | sysctl:
140 | name: net.bridge.bridge-nf-call-iptables
141 | value: '1'
142 | reload: yes
143 |
144 | - name: set net.bridge.bridge-nf-call-ip6tables
145 | sysctl:
146 | name: net.bridge.bridge-nf-call-ip6tables
147 | value: '1'
148 | reload: yes
149 |
150 |
--------------------------------------------------------------------------------
/roles/17_horizon/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart web services
2 | service: name={{ item }} state=restarted
3 | with_items:
4 | - apache2
5 | - memcached
6 |
--------------------------------------------------------------------------------
/roles/17_horizon/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: set openstack-dashboard-apache to be activated
2 | shell: echo openstack-dashboard-apache horizon/activate_vhost boolean true |debconf-set-selections
3 |
4 | - name: set openstack-dashboard-apache-ssl to be activated
5 | shell: echo openstack-dashboard-apache horizon/use_ssl boolean true |debconf-set-selections
6 |
7 | - name: ensure horizon packages are installed
8 | apt: name={{ item }}
9 | loop:
10 | - apache2
11 | - libapache2-mod-wsgi-py3
12 | - openstack-dashboard-apache
13 |
14 | - name: ensure default virtualhost is disabled
15 | command: a2dissite {{ item }}
16 | loop:
17 | - 000-default
18 | - default-ssl
19 | notify: restart web services
20 |
21 | - name: configure local_settings.py
22 | template:
23 | src: etc/openstack-dashboard/local_settings.py
24 | dest: /etc/openstack-dashboard/local_settings.py
25 | owner: root
26 | group: root
27 | mode: 0644
28 | notify: restart web services
29 |
30 | - name: ensure openstack-dashboard-ssl virtualhost is enabled
31 | command: a2ensite {{ item }}
32 | loop:
33 | - openstack-dashboard-ssl
34 | - openstack-dashboard-ssl-redirect
35 | notify: restart web services
36 |
37 | - name: Deelete debian's configuration of cache
38 | file: path=/etc/openstack-dashboard/local_settings.d/_0006_debian_cache.py state=absent
39 |
40 |
41 | - name: ensure ssl, wsgi and rewrite modules are enabled
42 | apache2_module: name={{ item }} state=present
43 | loop:
44 | - wsgi
45 | - ssl
46 | - rewrite
47 | notify: restart web services
48 |
49 |
--------------------------------------------------------------------------------
/roles/17_horizon/templates/etc/openstack-dashboard/local_settings.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # ----------------------------------------------------------------------
4 | # NOTE: The default values of the settings are defined in
5 | # openstack_dashboard/defaults.py. Prevously most available settings
6 | # were listed in this example file, but it is no longer true.
7 | # For available settings, see openstack_dashboard/defaults.py and
8 | # the horizon setting reference found at
9 | # https://docs.openstack.org/horizon/latest/configuration/settings.html.
10 | #
11 | # Django related settings and HORIZON_CONFIG still exist here.
12 | # Keep in my mind that they will be revisit in upcoming releases.
13 | # ----------------------------------------------------------------------
14 |
15 | import os
16 |
17 | from django.utils.translation import ugettext_lazy as _
18 |
19 | from horizon.utils import secret_key
20 |
21 | from openstack_dashboard.settings import HORIZON_CONFIG
22 |
23 | DEBUG = False
24 |
25 | # This setting controls whether or not compression is enabled. Disabling
26 | # compression makes Horizon considerably slower, but makes it much easier
27 | # to debug JS and CSS changes
28 | COMPRESS_ENABLED = not DEBUG
29 |
30 | # This setting controls whether compression happens on the fly, or offline
31 | # with `python manage.py compress`
32 | # See https://django-compressor.readthedocs.io/en/latest/usage/#offline-compression
33 | # for more information
34 | #COMPRESS_OFFLINE = not DEBUG
35 |
36 | # If horizon is running in production (DEBUG is False), set this
37 | # with the list of host/domain names that the application can serve.
38 | # For more information see:
39 | # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
40 | ALLOWED_HOSTS = [ '*' ]
41 |
42 | # Set SSL proxy settings:
43 | # Pass this header from the proxy after terminating the SSL,
44 | # and don't forget to strip it from the client's request.
45 | # For more information see:
46 | # https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header
47 | #SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
48 |
49 | # If Horizon is being served through SSL, then uncomment the following two
50 | # settings to better secure the cookies from security exploits
51 | #CSRF_COOKIE_SECURE = True
52 | #SESSION_COOKIE_SECURE = True
53 |
54 | # If provided, a "Report Bug" link will be displayed in the site header
55 | # which links to the value of this setting (ideally a URL containing
56 | # information on how to report issues).
57 | #HORIZON_CONFIG["bug_url"] = "http://bug-report.example.com"
58 |
59 | # Show backdrop element outside the modal, do not close the modal
60 | # after clicking on backdrop.
61 | #HORIZON_CONFIG["modal_backdrop"] = "static"
62 |
63 | # Specify a regular expression to validate user passwords.
64 | #HORIZON_CONFIG["password_validator"] = {
65 | # "regex": '.*',
66 | # "help_text": _("Your password does not meet the requirements."),
67 | #}
68 |
69 | # Turn off browser autocompletion for forms including the login form and
70 | # the database creation workflow if so desired.
71 | #HORIZON_CONFIG["password_autocomplete"] = "off"
72 |
73 | # Setting this to True will disable the reveal button for password fields,
74 | # including on the login form.
75 | #HORIZON_CONFIG["disable_password_reveal"] = False
76 |
77 | LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
78 |
79 | # Set custom secret key:
80 | # You can either set it to a specific value or you can let horizon generate a
81 | # default secret key that is unique on this machine, e.i. regardless of the
82 | # amount of Python WSGI workers (if used behind Apache+mod_wsgi): However,
83 | # there may be situations where you would want to set this explicitly, e.g.
84 | # when multiple dashboard instances are distributed on different machines
85 | # (usually behind a load-balancer). Either you have to make sure that a session
86 | # gets all requests routed to the same dashboard instance or you set the same
87 | # SECRET_KEY for all of them.
88 | SECRET_KEY = secret_key.generate_or_read_from_file(
89 | os.path.join("/","var","lib","openstack-dashboard","secret-key", '.secret_key_store'))
90 |
91 | # We recommend you use memcached for development; otherwise after every reload
92 | # of the django development server, you will have to login again. To use
93 | # memcached set CACHES to something like below.
94 | # For more information, see
95 | # https://docs.djangoproject.com/en/1.11/topics/http/sessions/.
96 | CACHES = {
97 | 'default': {
98 | 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
99 | 'LOCATION': '127.0.0.1:11211',
100 | },
101 | }
102 |
103 | # If you use ``tox -e runserver`` for developments,then configure
104 | # SESSION_ENGINE to django.contrib.sessions.backends.signed_cookies
105 | # as shown below:
106 | #SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
107 | SESSION_ENGINE = 'django.contrib.sessions.backends.file'
108 |
109 |
110 | # Send email to the console by default
111 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
112 | # Or send them to /dev/null
113 | #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
114 |
115 | # Configure these for your outgoing email host
116 | #EMAIL_HOST = 'smtp.my-company.com'
117 | #EMAIL_PORT = 25
118 | #EMAIL_HOST_USER = 'djangomail'
119 | #EMAIL_HOST_PASSWORD = 'top-secret!'
120 |
121 | OPENSTACK_HOST = "{{ external_ip }}"
122 |
123 | OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
124 |
125 | OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
126 |
127 | OPENSTACK_API_VERSIONS = {
128 | "identity": 3,
129 | "image": 2,
130 | "volume": 3,
131 | }
132 |
133 | OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"
134 |
135 | OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
136 |
137 | # The OPENSTACK_NEUTRON_NETWORK settings can be used to enable optional
138 | # services provided by neutron. Options currently available are load
139 | # balancer service, security groups, quotas, VPN service.
140 | OPENSTACK_NEUTRON_NETWORK = {
141 | 'enable_auto_allocated_network': True,
142 | 'enable_distributed_router': True,
143 | 'enable_fip_topology_check': True,
144 | 'enable_ha_router': True,
145 | 'enable_ipv6': True,
146 | # TODO(amotoki): Drop OPENSTACK_NEUTRON_NETWORK completely from here.
147 | # enable_quotas has the different default value here.
148 | 'enable_quotas': True,
149 | 'enable_rbac_policy': True,
150 | 'enable_router': True,
151 |
152 | 'default_dns_nameservers': [],
153 | 'supported_provider_types': ['*'],
154 | 'segmentation_id_range': {},
155 | 'extra_provider_types': {},
156 | 'supported_vnic_types': ['*'],
157 | 'physical_networks': [],
158 |
159 | }
160 |
161 | # The timezone of the server. This should correspond with the timezone
162 | # of your entire OpenStack installation, and hopefully be in UTC.
163 | TIME_ZONE = "{{ timezone }}"
164 |
165 | # Change this patch to the appropriate list of tuples containing
166 | # a key, label and static directory containing two files:
167 | # _variables.scss and _styles.scss
168 | #AVAILABLE_THEMES = [
169 | # ('default', 'Default', 'themes/default'),
170 | # ('material', 'Material', 'themes/material'),
171 | # ('example', 'Example', 'themes/example'),
172 | #]
173 |
174 | LOGGING = {
175 | 'version': 1,
176 | # When set to True this will disable all logging except
177 | # for loggers specified in this configuration dictionary. Note that
178 | # if nothing is specified here and disable_existing_loggers is True,
179 | # django.db.backends will still log unless it is disabled explicitly.
180 | 'disable_existing_loggers': False,
181 | # If apache2 mod_wsgi is used to deploy OpenStack dashboard
182 | # timestamp is output by mod_wsgi. If WSGI framework you use does not
183 | # output timestamp for logging, add %(asctime)s in the following
184 | # format definitions.
185 | 'formatters': {
186 | 'console': {
187 | 'format': '%(levelname)s %(name)s %(message)s'
188 | },
189 | 'operation': {
190 | # The format of "%(message)s" is defined by
191 | # OPERATION_LOG_OPTIONS['format']
192 | 'format': '%(message)s'
193 | },
194 | },
195 | 'handlers': {
196 | 'null': {
197 | 'level': 'DEBUG',
198 | 'class': 'logging.NullHandler',
199 | },
200 | 'console': {
201 | # Set the level to "DEBUG" for verbose output logging.
202 | 'level': 'DEBUG' if DEBUG else 'INFO',
203 | 'class': 'logging.StreamHandler',
204 | 'formatter': 'console',
205 | },
206 | 'operation': {
207 | 'level': 'INFO',
208 | 'class': 'logging.StreamHandler',
209 | 'formatter': 'operation',
210 | },
211 | },
212 | 'loggers': {
213 | 'horizon': {
214 | 'handlers': ['console'],
215 | 'level': 'DEBUG',
216 | 'propagate': False,
217 | },
218 | 'horizon.operation_log': {
219 | 'handlers': ['operation'],
220 | 'level': 'INFO',
221 | 'propagate': False,
222 | },
223 | 'openstack_dashboard': {
224 | 'handlers': ['console'],
225 | 'level': 'DEBUG',
226 | 'propagate': False,
227 | },
228 | 'novaclient': {
229 | 'handlers': ['console'],
230 | 'level': 'DEBUG',
231 | 'propagate': False,
232 | },
233 | 'cinderclient': {
234 | 'handlers': ['console'],
235 | 'level': 'DEBUG',
236 | 'propagate': False,
237 | },
238 | 'keystoneauth': {
239 | 'handlers': ['console'],
240 | 'level': 'DEBUG',
241 | 'propagate': False,
242 | },
243 | 'keystoneclient': {
244 | 'handlers': ['console'],
245 | 'level': 'DEBUG',
246 | 'propagate': False,
247 | },
248 | 'glanceclient': {
249 | 'handlers': ['console'],
250 | 'level': 'DEBUG',
251 | 'propagate': False,
252 | },
253 | 'neutronclient': {
254 | 'handlers': ['console'],
255 | 'level': 'DEBUG',
256 | 'propagate': False,
257 | },
258 | 'swiftclient': {
259 | 'handlers': ['console'],
260 | 'level': 'DEBUG',
261 | 'propagate': False,
262 | },
263 | 'oslo_policy': {
264 | 'handlers': ['console'],
265 | 'level': 'DEBUG',
266 | 'propagate': False,
267 | },
268 | 'openstack_auth': {
269 | 'handlers': ['console'],
270 | 'level': 'DEBUG',
271 | 'propagate': False,
272 | },
273 | 'django': {
274 | 'handlers': ['console'],
275 | 'level': 'DEBUG',
276 | 'propagate': False,
277 | },
278 | # Logging from django.db.backends is VERY verbose, send to null
279 | # by default.
280 | 'django.db.backends': {
281 | 'handlers': ['null'],
282 | 'propagate': False,
283 | },
284 | 'requests': {
285 | 'handlers': ['null'],
286 | 'propagate': False,
287 | },
288 | 'urllib3': {
289 | 'handlers': ['null'],
290 | 'propagate': False,
291 | },
292 | 'chardet.charsetprober': {
293 | 'handlers': ['null'],
294 | 'propagate': False,
295 | },
296 | 'iso8601': {
297 | 'handlers': ['null'],
298 | 'propagate': False,
299 | },
300 | 'scss': {
301 | 'handlers': ['null'],
302 | 'propagate': False,
303 | },
304 | },
305 | }
306 |
307 | # 'direction' should not be specified for all_tcp/udp/icmp.
308 | # It is specified in the form.
309 | SECURITY_GROUP_RULES = {
310 | 'all_tcp': {
311 | 'name': _('All TCP'),
312 | 'ip_protocol': 'tcp',
313 | 'from_port': '1',
314 | 'to_port': '65535',
315 | },
316 | 'all_udp': {
317 | 'name': _('All UDP'),
318 | 'ip_protocol': 'udp',
319 | 'from_port': '1',
320 | 'to_port': '65535',
321 | },
322 | 'all_icmp': {
323 | 'name': _('All ICMP'),
324 | 'ip_protocol': 'icmp',
325 | 'from_port': '-1',
326 | 'to_port': '-1',
327 | },
328 | 'ssh': {
329 | 'name': 'SSH',
330 | 'ip_protocol': 'tcp',
331 | 'from_port': '22',
332 | 'to_port': '22',
333 | },
334 | 'smtp': {
335 | 'name': 'SMTP',
336 | 'ip_protocol': 'tcp',
337 | 'from_port': '25',
338 | 'to_port': '25',
339 | },
340 | 'dns': {
341 | 'name': 'DNS',
342 | 'ip_protocol': 'tcp',
343 | 'from_port': '53',
344 | 'to_port': '53',
345 | },
346 | 'http': {
347 | 'name': 'HTTP',
348 | 'ip_protocol': 'tcp',
349 | 'from_port': '80',
350 | 'to_port': '80',
351 | },
352 | 'pop3': {
353 | 'name': 'POP3',
354 | 'ip_protocol': 'tcp',
355 | 'from_port': '110',
356 | 'to_port': '110',
357 | },
358 | 'imap': {
359 | 'name': 'IMAP',
360 | 'ip_protocol': 'tcp',
361 | 'from_port': '143',
362 | 'to_port': '143',
363 | },
364 | 'ldap': {
365 | 'name': 'LDAP',
366 | 'ip_protocol': 'tcp',
367 | 'from_port': '389',
368 | 'to_port': '389',
369 | },
370 | 'https': {
371 | 'name': 'HTTPS',
372 | 'ip_protocol': 'tcp',
373 | 'from_port': '443',
374 | 'to_port': '443',
375 | },
376 | 'smtps': {
377 | 'name': 'SMTPS',
378 | 'ip_protocol': 'tcp',
379 | 'from_port': '465',
380 | 'to_port': '465',
381 | },
382 | 'imaps': {
383 | 'name': 'IMAPS',
384 | 'ip_protocol': 'tcp',
385 | 'from_port': '993',
386 | 'to_port': '993',
387 | },
388 | 'pop3s': {
389 | 'name': 'POP3S',
390 | 'ip_protocol': 'tcp',
391 | 'from_port': '995',
392 | 'to_port': '995',
393 | },
394 | 'ms_sql': {
395 | 'name': 'MS SQL',
396 | 'ip_protocol': 'tcp',
397 | 'from_port': '1433',
398 | 'to_port': '1433',
399 | },
400 | 'mysql': {
401 | 'name': 'MYSQL',
402 | 'ip_protocol': 'tcp',
403 | 'from_port': '3306',
404 | 'to_port': '3306',
405 | },
406 | 'rdp': {
407 | 'name': 'RDP',
408 | 'ip_protocol': 'tcp',
409 | 'from_port': '3389',
410 | 'to_port': '3389',
411 | },
412 | }
413 |
414 | # Help URL can be made available for the client. To provide a help URL, edit the
415 | # following attribute to the URL of your choice.
416 | #HORIZON_CONFIG["help_url"] = "http://openstack.mycompany.org"
417 |
--------------------------------------------------------------------------------
/roles/18_cinderserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart cinder-services
2 | service: name={{ item }} state=restarted
3 | with_items:
4 | - cinder-api
5 | - cinder-scheduler
6 |
--------------------------------------------------------------------------------
/roles/18_cinderserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure cinder packages are installed
2 | apt: name={{ item }}
3 | loop:
4 | - cinder-api
5 | - cinder-scheduler
6 |
7 | - name: ensure cinder_api database connections is configured
8 | ini_file:
9 | path: /etc/cinder/cinder.conf
10 | section: database
11 | option: connection
12 | value: mysql+pymysql://cinder:{{ cinder_db_password }}@{{ internal_ip }}/cinder
13 | notify:
14 | - restart cinder-services
15 |
16 | - name: set default section options
17 | ini_file:
18 | path: /etc/cinder/cinder.conf
19 | section: DEFAULT
20 | option: "{{ item.option }}"
21 | value: "{{ item.value }}"
22 | loop:
23 | - { option: "transport_url",
24 | value: 'rabbit://{{ rabbit_user }}:{{ rabbit_password }}@{{ internal_ip }}:5672/'}
25 | - { option: "my_ip", value: '{{ internal_ip }}' }
26 | - { option: "auth_strategy", value: keystone }
27 | - { option: "glance_api_servers", value: 'http://{{ hostvars[groups["storage_nodes"][0]]["internal_ip"] }}:9292' }
28 | notify:
29 | - restart cinder-services
30 |
31 | - name: configure keystone_authtoken section
32 | ini_file:
33 | path: /etc/cinder/cinder.conf
34 | section: keystone_authtoken
35 | option: "{{ item.option }}"
36 | value: "{{ item.value }}"
37 | loop:
38 | - { option: "www_authenticate_uri", value: 'http://{{ internal_ip }}:5000' }
39 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000' }
40 | - { option: "memcached_servers", value: '{{ internal_ip }}:11211' }
41 | - { option: "auth_type", value: password }
42 | - { option: "project_domain_name", value: Default}
43 | - { option: "user_domain_name", value: Default}
44 | - { option: "project_name", value: service}
45 | - { option: "username", value: cinder}
46 | - { option: "password", value: "{{ cinder_identity_password }}" }
47 | - { option: "region", value: "{{ region }}" }
48 | - { option: "region_name", value: "{{ region }}" }
49 | notify:
50 | - restart cinder-services
51 |
52 | - name: configure oslo_concurrency section
53 | ini_file:
54 | path: /etc/cinder/cinder.conf
55 | section: oslo_concurrency
56 | option: lock_path
57 | value: /var/lib/cinder/tmp
58 | notify:
59 | - restart cinder-services
60 |
61 | - name: ensure cinder db is initialized
62 | command: /usr/bin/cinder-manage db sync
63 | notify: restart cinder-services
64 |
--------------------------------------------------------------------------------
/roles/19_cindervolume/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart cinder-services
2 | service: name={{ item }} state=restarted
3 | loop:
4 | - cinder-volume
5 | - tgt
6 |
--------------------------------------------------------------------------------
/roles/19_cindervolume/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure tgt,lvm2 and thin-provisioning-tools packages are installed
2 | apt: name={{ item }}
3 | loop:
4 | - lvm2
5 | - tgt
6 | - thin-provisioning-tools
7 |
8 | - name: create group volume
9 | lvg: vg=cinder-volumes pvs=/dev/{{ cinder_physical_device }} vg_options=--force
10 |
11 | # Modify properly when the host is using LVM for OS
12 | - name: configure LVM to scan only the associated physical device
13 | replace:
14 | path: /etc/lvm/lvm.conf
15 | after: 'This configuration option has an automatic default value.'
16 | regexp: '(\s+)\# filter = \[ "a\|\.\*\/\|" \](\s+.*)?$'
17 | replace: 'filter = ["a/{{ cinder_physical_device }}/", "r/.*/"]'
18 |
19 | - name: install cinder-volume package
20 | apt: name=cinder-volume
21 |
22 | - name: ensure cinder_api database connections is configured
23 | ini_file:
24 | path: /etc/cinder/cinder.conf
25 | section: database
26 | option: connection
27 | value: mysql+pymysql://cinder:{{ cinder_db_password }}@{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}/cinder
28 | notify:
29 | - restart cinder-services
30 |
31 | - name: set default section options
32 | ini_file:
33 | path: /etc/cinder/cinder.conf
34 | section: DEFAULT
35 | option: "{{ item.option }}"
36 | value: "{{ item.value }}"
37 | loop:
38 | - { option: "transport_url",
39 | value: 'rabbit://{{ rabbit_user }}:{{ rabbit_password }}@{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5672/'}
40 | - { option: "my_ip", value: '{{ internal_ip }}' }
41 | - { option: "auth_strategy", value: keystone }
42 | - { option: "enabled_backends", value: lvm }
43 | - { option: "glance_api_servers", value: 'http://{{ hostvars[groups["storage_nodes"][0]]["internal_ip"] }}:9292' }
44 | notify:
45 | - restart cinder-services
46 |
47 | - name: configure keystone_authtoken section
48 | ini_file:
49 | path: /etc/cinder/cinder.conf
50 | section: keystone_authtoken
51 | option: "{{ item.option }}"
52 | value: "{{ item.value }}"
53 | loop:
54 | - { option: "www_authenticate_uri", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
55 | - { option: "auth_url", value: 'http://{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:5000' }
56 | - { option: "memcached_servers", value: '{{ hostvars[groups["controller_nodes"][0]]["internal_ip"] }}:11211' }
57 | - { option: "auth_type", value: password }
58 | - { option: "project_domain_name", value: Default}
59 | - { option: "user_domain_name", value: Default}
60 | - { option: "project_name", value: service}
61 | - { option: "username", value: cinder}
62 | - { option: "password", value: "{{ cinder_identity_password }}" }
63 | - { option: "region", value: "{{ region }}" }
64 | - { option: "region_name", value: "{{ region }}" }
65 | notify:
66 | - restart cinder-services
67 |
68 | - name: configure lvm section
69 | ini_file:
70 | path: /etc/cinder/cinder.conf
71 | section: lvm
72 | option: "{{ item.option }}"
73 | value: "{{ item.value }}"
74 | loop:
75 | - { option: "volume_driver", value: cinder.volume.drivers.lvm.LVMVolumeDriver }
76 | - { option: "volume_group", value: cinder-volumes }
77 | - { option: "target_protocol", value: iscsi }
78 | - { option: "target_helper", value: tgtadm }
79 | notify:
80 | - restart cinder-services
81 |
82 | - name: configure oslo_concurrency section
83 | ini_file:
84 | path: /etc/cinder/cinder.conf
85 | section: oslo_concurrency
86 | option: lock_path
87 | value: /var/lib/cinder/tmp
88 | notify:
89 | - restart cinder-services
90 |
--------------------------------------------------------------------------------
/roles/20_heatserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 |
2 | - name: restart heat-services
3 | service: name={{ item }} state=restarted
4 | with_items:
5 | - heat-api-cfn
6 | - heat-api
7 | - heat-engine
8 |
9 | - name: restart apache2
10 | service: name=apache2 state=restarted
11 |
--------------------------------------------------------------------------------
/roles/20_heatserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure heat packages are installed
2 | apt: name={{ item }}
3 | loop:
4 | - heat-api
5 | - heat-api-cfn
6 | - heat-engine
7 |
8 | - name: ensure heat_api database connections is configured
9 | ini_file:
10 | path: /etc/heat/heat.conf
11 | section: database
12 | option: connection
13 | value: mysql+pymysql://heat:{{ heat_db_password }}@{{ internal_ip }}/heat
14 | notify:
15 | - restart heat-services
16 |
17 | - name: set default section options
18 | ini_file:
19 | path: /etc/heat/heat.conf
20 | section: DEFAULT
21 | option: "{{ item.option }}"
22 | value: "{{ item.value }}"
23 | loop:
24 | - { option: "transport_url",
25 | value: 'rabbit://{{ rabbit_user }}:{{ rabbit_password }}@{{ internal_ip }}:5672/'}
26 | - { option: "heat_metadata_server_url", value: 'http://{{ internal_ip }}:8000' }
27 | - { option: "heat_waitcondition_server_url",
28 | value: 'http://{{ internal_ip }}:8000/v1/waitcondition' }
29 | - { option: "stack_domain_admin", value: "heat_domain_admin" }
30 | - { option: "stack_domain_admin_password",
31 | value: "{{ heat_domain_admin_identity_password }}" }
32 | - { option: "stack_user_domain_name", value: "heat" }
33 | notify:
34 | - restart heat-services
35 |
36 | - name: configure keystone_authtoken section
37 | ini_file:
38 | path: /etc/heat/heat.conf
39 | section: keystone_authtoken
40 | option: "{{ item.option }}"
41 | value: "{{ item.value }}"
42 | loop:
43 | - { option: "www_authenticate_uri", value: 'http://{{ internal_ip }}:5000' }
44 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000' }
45 | - { option: "memcached_servers", value: '{{ internal_ip }}:11211' }
46 | - { option: "auth_type", value: password }
47 | - { option: "project_domain_name", value: Default}
48 | - { option: "user_domain_name", value: Default}
49 | - { option: "project_name", value: service}
50 | - { option: "username", value: heat}
51 | - { option: "password", value: "{{ heat_identity_password }}" }
52 | - { option: "region", value: "{{ region }}" }
53 | - { option: "region_name", value: "{{ region }}" }
54 | notify:
55 | - restart heat-services
56 |
57 | - name: configure trustee section
58 | ini_file:
59 | path: /etc/heat/heat.conf
60 | section: trustee
61 | option: "{{ item.option }}"
62 | value: "{{ item.value }}"
63 | loop:
64 | - { option: "auth_type", value: 'password' }
65 | - { option: "auth_url", value: 'http://{{ internal_ip }}:5000' }
66 | - { option: "username", value: 'heat' }
67 | - { option: "password", value: "{{ heat_identity_password }}" }
68 | - { option: "user_domain_name", value: Default}
69 | notify:
70 | - restart heat-services
71 |
72 | - name: ensure heat db is initialized
73 | command: /usr/bin/heat-manage db_sync
74 | notify:
75 | - restart heat-services
76 |
77 | - name: ensure heat plugin horizon packages is installed
78 | apt: name=python3-heat-dashboard
79 | notify:
80 | - restart apache2
81 |
--------------------------------------------------------------------------------
/roles/magnumserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart magnum-services
2 | service: name={{ item }} state=restarted
3 | with_items:
4 | - magnum-api
5 | - magnum-conductor
6 |
--------------------------------------------------------------------------------
/roles/magnumserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure magnum packages are installed
2 | apt: name={{ item }}
3 | with_items:
4 | - python-magnum
5 | - python-magnumclient
6 | - magnum-common
7 | - magnum-api
8 | - magnum-conductor
9 |
10 | - name: ensure magnum sqlite is deleted
11 | file: dest=/var/lib/magnum/magnum.sqlite state=absent
12 |
13 | - name: ensure magnum.conf file is up to date
14 | template: >
15 | src=etc/magnum/magnum.conf
16 | dest=/etc/magnum/magnum.conf
17 | owner=magnum
18 | group=magnum
19 | mode=0600
20 | notify:
21 | - restart magnum-services
22 |
23 | - name: ensure magnum db is initialized
24 | command: /usr/bin/magnum-db-manage --config-file /etc/magnum/magnum.conf upgrade
25 | notify:
26 | - restart magnum-services
27 |
28 |
--------------------------------------------------------------------------------
/roles/manilaserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart manila services
2 | service: name={{ item }} state=restarted
3 | with_items:
4 | - manila-api
5 | - manila-scheduler
6 |
--------------------------------------------------------------------------------
/roles/manilaserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure manila packages are installed
2 | apt: name={{ item }}
3 | with_items:
4 | - manila-api
5 | - manila-scheduler
6 | - python-manilaclient
7 |
8 | - name: ensure manila sqlite is deleted
9 | file: dest=/var/lib/manila/manila.sqlite state=absent
10 |
11 | - name: ensure manila.conf is configured
12 | template: >
13 | src=etc/manila/manila.conf
14 | dest=/etc/manila/manila.conf
15 | owner=manila group=manila mode=0640
16 | notify:
17 | - restart manila services
18 |
19 | - name: ensure manila db is initialized
20 | command: /usr/bin/manila-manage db sync
21 | notify: restart manila services
22 |
--------------------------------------------------------------------------------
/roles/manilashare/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: restart manila services
2 | service: name={{ item }} state=restarted
3 | with_items:
4 | - manila-share
5 |
--------------------------------------------------------------------------------
/roles/manilashare/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure manila packages are installed
2 | apt: name={{ item }}
3 | with_items:
4 | - manila-share
5 | - python-pymysql
6 | - lvm2
7 | - nfs-kernel-server
8 |
9 | - name: ensure physical and group volumes are created
10 | lvg: vg=lvm-shares pvs={{ manila_physical_device }} vg_options=--force
11 |
12 | - name: ensure manila.conf is configured
13 | template: >
14 | src=../../manilaserver/templates/etc/manila/manila.conf
15 | dest=/etc/manila/manila.conf
16 | owner=manila group=manila mode=0640
17 | notify:
18 | - restart manila services
19 |
20 |
--------------------------------------------------------------------------------
/roles/troveserver/handlers/main.yml:
--------------------------------------------------------------------------------
1 |
2 | - name: restart trove-services
3 | service: name={{ item }} state=restarted
4 | with_items:
5 | - trove-api
6 | - trove-taskmanager
7 | - trove-conductor
8 |
9 | - name: restart web services
10 | service: name={{ item }} state=restarted
11 | with_items:
12 | - apache2
13 | - memcached
--------------------------------------------------------------------------------
/roles/troveserver/tasks/main.yml:
--------------------------------------------------------------------------------
1 | - name: ensure trove packages are installed
2 | apt: name={{ item }}
3 | with_items:
4 | - python-trove
5 | - python-troveclient
6 | - python-glanceclient
7 | - trove-common
8 | - trove-api
9 | - trove-taskmanager
10 | - trove-conductor
11 |
12 | - name: ensure trove sqlite is deleted
13 | file: dest=/var/lib/trove/trove.sqlite state=absent
14 |
15 | - name: ensure trove.conf file is up to date
16 | template: >
17 | src=etc/trove/trove.conf
18 | dest=/etc/trove/trove.conf
19 | owner=trove
20 | group=trove
21 | mode=0600
22 | notify:
23 | - restart trove-services
24 |
25 | - name: ensure trove-taskmanager.conf file is up to date
26 | template: >
27 | src=etc/trove/trove-taskmanager.conf
28 | dest=/etc/trove/trove-taskmanager.conf
29 | owner=trove
30 | group=trove
31 | mode=0600
32 | notify:
33 | - restart trove-services
34 |
35 | - name: ensure trove-conductor.conf file is up to date
36 | template: >
37 | src=etc/trove/trove-conductor.conf
38 | dest=/etc/trove/trove-conductor.conf
39 | owner=trove
40 | group=trove
41 | mode=0600
42 | notify:
43 | - restart trove-services
44 |
45 | - name: ensure trove-guestagent.conf file is up to date
46 | template: >
47 | src=etc/trove/trove-guestagent.conf
48 | dest=/etc/trove/trove-guestagent.conf
49 | owner=trove
50 | group=trove
51 | mode=0600
52 | notify:
53 | - restart trove-services
54 |
55 | - name: ensure trove db is initialized
56 | command: /usr/bin/trove-manage db_sync
57 | notify:
58 | - restart trove-services
59 |
60 | - name: ensure trove dashboard plugin is installed
61 | apt: name=python-trove-dashboard
62 | notify:
63 | - restart web services
64 |
65 |
--------------------------------------------------------------------------------
/roles/troveserver/templates/etc/trove/trove-conductor.conf:
--------------------------------------------------------------------------------
1 | [DEFAULT]
2 | #verbose = True
3 | #debug = True
4 | trove_auth_url = http://{{ controller_ip }}:5000/v2.0
5 |
6 | # The manager class to use for conductor. (string value)
7 | conductor_manager = trove.conductor.manager.Manager
8 |
9 | #===================== RPC Configuration =================================
10 |
11 | # URL representing the messaging driver to use and its full configuration.
12 | # If not set, we fall back to the 'rpc_backend' option and driver specific
13 | # configuration.
14 | #transport_url=
15 |
16 | # The messaging driver to use. Options include rabbit, qpid and zmq.
17 | # Default is rabbit. (string value)
18 | #rpc_backend=rabbit
19 |
20 | # The default exchange under which topics are scoped. May be
21 | # overridden by an exchange name specified in the 'transport_url option.
22 | control_exchange = trove
23 |
24 | [profiler]
25 | # If False fully disable profiling feature.
26 | #enabled = False
27 | # If False doesn't trace SQL requests.
28 | #trace_sqlalchemy = True
29 |
30 | [database]
31 | connection = mysql://trove:{{ trove_db_password }}@{{ controller_ip }}/trove
32 |
33 | [oslo_messaging_rabbit]
34 | # The RabbitMQ broker address where a single node is used. (string value)
35 | # Deprecated group/name - [DEFAULT]/rabbit_host
36 | rabbit_host = {{ controller_ip }}
37 |
38 | # The RabbitMQ broker port where a single node is used. (integer value)
39 | # Deprecated group/name - [DEFAULT]/rabbit_port
40 | #rabbit_port=5672
41 |
42 | # RabbitMQ HA cluster host:port pairs. (list value)
43 | # Deprecated group/name - [DEFAULT]/rabbit_hosts
44 | #rabbit_hosts=$rabbit_host:$rabbit_port
45 |
46 | # Connect over SSL for RabbitMQ. (boolean value)
47 | # Deprecated group/name - [DEFAULT]/rabbit_use_ssl
48 | #rabbit_use_ssl=false
49 |
50 | # The RabbitMQ userid. (string value)
51 | # Deprecated group/name - [DEFAULT]/rabbit_userid
52 | rabbit_userid = {{ rabbit_user }}
53 |
54 | # The RabbitMQ password. (string value)
55 | # Deprecated group/name - [DEFAULT]/rabbit_password
56 | rabbit_password = {{ rabbit_password }}
57 |
58 | # The RabbitMQ virtual host. (string value)
59 | # Deprecated group/name - [DEFAULT]/rabbit_virtual_host
60 | #rabbit_virtual_host=/
61 |
--------------------------------------------------------------------------------
/roles/troveserver/templates/etc/trove/trove-guestagent.conf:
--------------------------------------------------------------------------------
1 | [DEFAULT]
2 |
3 |
4 | #=========== RPC Configuration ======================
5 |
6 | # URL representing the messaging driver to use and its full configuration.
7 | # If not set, we fall back to the 'rpc_backend' option and driver specific
8 | # configuration.
9 | #transport_url=
10 |
11 | # The messaging driver to use. Options include rabbit, qpid and zmq.
12 | # Default is rabbit. (string value)
13 | rpc_backend=rabbit
14 |
15 | # The default exchange under which topics are scoped. May be
16 | # overridden by an exchange name specified in the 'transport_url option.
17 | control_exchange = trove
18 |
19 | # ========== Configuration options for Swift ==========
20 |
21 | # The swift_url can be specified directly or fetched from Keystone catalog.
22 |
23 | # To fetch from Keystone, comment out swift_url, and uncomment the others.
24 | # swift_url = http://10.0.0.1:8080/v1/AUTH_
25 | # Region name of this node. Default value is None.
26 | # os_region_name = RegionOne
27 | # Service type to use when searching catalog.
28 | # swift_service_type = object-store
29 |
30 |
31 | # ========== Datastore Manager Configurations ==========
32 |
33 | # Datastore manager implementations.
34 | # Format: list of 'datastore-type:datastore.manager.implementation.module'
35 | # datastore_registry_ext = mysql:trove.guestagent.datastore.mysql.manager.Manager, percona:trove.guestagent.datastore.mysql.manager.Manager
36 |
37 |
38 | # ========== Default Users / DBs Configuration ==========
39 |
40 | # Permissions to grant "root" user by default
41 | root_grant = ALL
42 | root_grant_option = True
43 | # root_grant = ALTER ROUTINE, CREATE, ALTER, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, CREATE USER, DELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, LOCK TABLES, PROCESS, REFERENCES, SELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE
44 | # root_grant_option = False
45 |
46 | # Default password Length for root password
47 | # default_password_length = 36
48 |
49 |
50 | # ========== Default Storage Options for backup ==========
51 |
52 | # Default configuration for storage strategy and storage options
53 | # for backups
54 |
55 | # For storage to Swift, use the following as defaults:
56 | # storage_strategy = SwiftStorage
57 | # storage_namespace = trove.common.strategies.storage.swift
58 |
59 | # Default config options for storing backups to swift
60 | # backup_swift_container = database_backups
61 | # backup_use_gzip_compression = True
62 | # backup_use_openssl_encryption = True
63 | # backup_aes_cbc_key = "default_aes_cbc_key"
64 | # backup_use_snet = False
65 | # backup_chunk_size = 65536
66 | # backup_segment_max_size = 2147483648
67 |
68 |
69 | # ========== Sample Logging Configuration ==========
70 |
71 | # Show more verbose log output (sets INFO log level output)
72 | # verbose = True
73 |
74 | # Show debugging output in logs (sets DEBUG log level output)
75 | # debug = True
76 |
77 | # Directory and path for log files
78 | log_dir = /var/log/trove/
79 | log_file = logfile.txt
80 |
81 | [profiler]
82 | # If False fully disable profiling feature.
83 | #enabled = False
84 | # If False doesn't trace SQL requests.
85 | #trace_sqlalchemy = True
86 |
87 | [oslo_messaging_rabbit]
88 | # The RabbitMQ broker address where a single node is used. (string value)
89 | # Deprecated group/name - [DEFAULT]/rabbit_host
90 | rabbit_host = {{ controller_ip }}
91 |
92 | # The RabbitMQ broker port where a single node is used. (integer value)
93 | # Deprecated group/name - [DEFAULT]/rabbit_port
94 | #rabbit_port=5672
95 |
96 | # RabbitMQ HA cluster host:port pairs. (list value)
97 | # Deprecated group/name - [DEFAULT]/rabbit_hosts
98 | #rabbit_hosts=$rabbit_host:$rabbit_port
99 |
100 | # Connect over SSL for RabbitMQ. (boolean value)
101 | # Deprecated group/name - [DEFAULT]/rabbit_use_ssl
102 | #rabbit_use_ssl=false
103 |
104 | # The RabbitMQ userid. (string value)
105 | # Deprecated group/name - [DEFAULT]/rabbit_userid
106 | rabbit_userid = {{ rabbit_user }}
107 |
108 | # The RabbitMQ password. (string value)
109 | # Deprecated group/name - [DEFAULT]/rabbit_password
110 | rabbit_password = {{ rabbit_password }}
111 |
112 | # The RabbitMQ virtual host. (string value)
113 | # Deprecated group/name - [DEFAULT]/rabbit_virtual_host
114 | #rabbit_virtual_host=/
115 |
116 | # ========== Datastore Specific Configuration Options ==========
117 |
118 | [mysql]
119 | # For mysql, the following are the defaults for backup, and restore:
120 | # backup_strategy = InnoBackupEx
121 | # backup_namespace = trove.guestagent.strategies.backup.mysql_impl
122 | # restore_namespace = trove.guestagent.strategies.restore.mysql_impl
123 | # Default configuration for mysql replication
124 | # replication_strategy = MysqlBinlogReplication
125 | # replication_namespace = trove.guestagent.strategies.replication.mysql_binlog
126 | # replication_user = slave_user
127 | # replication_password = slave_password
128 |
129 | # Users to ignore for user create/list/delete operations
130 | # ignore_users = os_admin
131 |
132 | # Databases to ignore for db create/list/delete operations
133 | # ignore_dbs = mysql, information_schema, performance_schema
134 |
135 | [vertica]
136 | # For vertica, following are the defaults needed:
137 | # mount_point = /var/lib/vertica
138 | # readahead_size = 2048
139 | # guestagent_strategy = trove.common.strategies.cluster.experimental.vertica.guestagent.VerticaGuestAgentStrategy
140 |
141 | [redis]
142 | # For redis, the following are the defaults for backup, and restore:
143 | # backup_strategy = RedisBackup
144 | # backup_namespace = trove.guestagent.strategies.backup.experimental.redis_impl
145 | # restore_namespace = trove.guestagent.strategies.restore.experimental.redis_impl
146 |
147 | [percona]
148 | backup_namespace = trove.guestagent.strategies.backup.mysql_impl
149 | restore_namespace = trove.guestagent.strategies.restore.mysql_impl
150 |
151 | [couchbase]
152 | backup_namespace = trove.guestagent.strategies.backup.experimental.couchbase_impl
153 | restore_namespace = trove.guestagent.strategies.restore.experimental.couchbase_impl
154 |
155 | [cassandra]
156 | backup_namespace = trove.guestagent.strategies.backup.experimental.cassandra_impl
157 | restore_namespace = trove.guestagent.strategies.restore.experimental.cassandra_impl
158 |
159 | [db2]
160 | # For db2, the following are the defaults for backup, and restore:
161 | # backup_strategy = DB2Backup
162 | # backup_namespace = trove.guestagent.strategies.backup.experimental.db2_impl
163 | # restore_namespace = trove.guestagent.strategies.restore.experimental.db2_impl
164 |
165 | [couchdb]
166 | #For CouchDB, the following are the defaults for backup and restore:
167 | # backup_strategy = CouchDBBackup
168 | # backup_namespace = trove.guestagent.strategies.backup.experimental.couchdb_impl
169 | # restore_namespace = trove.guestagent.strategies.restore.experimental.couchdb_impl
170 |
--------------------------------------------------------------------------------
/roles/troveserver/templates/etc/trove/trove-taskmanager.conf:
--------------------------------------------------------------------------------
1 | [DEFAULT]
2 | # Show more verbose log output (sets INFO log level output)
3 | #verbose = True
4 |
5 | # Show debugging output in logs (sets DEBUG log level output)
6 | #debug = True
7 |
8 | # Update the service and instance statuses if the instances fails to become
9 | # active within the configured usage_timeout.
10 | # usage_timeout = 600
11 | # restore_usage_timeout = 36000
12 | update_status_on_fail = True
13 |
14 | #================= RPC Configuration ================================
15 |
16 | # URL representing the messaging driver to use and its full configuration.
17 | # If not set, we fall back to the 'rpc_backend' option and driver specific
18 | # configuration.
19 | #transport_url=
20 |
21 | # The messaging driver to use. Options include rabbit, qpid and zmq.
22 | # Default is rabbit. (string value)
23 | #rpc_backend=rabbit
24 |
25 | # The default exchange under which topics are scoped. May be
26 | # overridden by an exchange name specified in the 'transport_url option.
27 | control_exchange = trove
28 |
29 | #DB Api Implementation
30 | db_api_implementation = trove.db.sqlalchemy.api
31 |
32 | # Configuration options for talking to nova via the novaclient.
33 | trove_auth_url = http://{{ controller_ip }}:5000/v2.0
34 | nova_compute_url = http://{{ controller_ip }}:8774/v2
35 | cinder_url = http://{{ controller_ip }}:8776/v1
36 | swift_url = http://{{ controller_ip }}:8080/v1/AUTH_
37 | neutron_url = http://{{ controller_ip }}:9696/
38 |
39 | # nova_compute_url, cinder_url, swift_url, and heat_url can all be fetched
40 | # from Keystone. To fetch from Keystone, comment out nova_compute_url,
41 | # cinder_url, swift_url, and heat_url and optionally uncomment the lines below.
42 |
43 | # Region name of this node. Used when searching catalog. Default value is None.
44 | #os_region_name = RegionOne
45 | # Service type to use when searching catalog.
46 | #nova_compute_service_type = compute
47 | # Service type to use when searching catalog.
48 | #cinder_service_type = volumev2
49 | # Service type to use when searching catalog.
50 | #swift_service_type = object-store
51 | # Service type to use when searching catalog.
52 | #heat_service_type = orchestration
53 | # Service type to use when searching catalog.
54 | #neutron_service_type = network
55 |
56 | # Config options for enabling volume service
57 | trove_volume_support = True
58 | block_device_mapping = vdb
59 | device_path = /dev/vdb
60 | mount_point = /var/lib/mysql
61 | volume_time_out=30
62 | server_delete_time_out=480
63 |
64 | # Nova server boot options
65 | # sets the --config-drive argument when doing a nova boot
66 | # (controls how file injection is handled by nova)
67 | use_nova_server_config_drive = True
68 |
69 | # Configuration options for talking to nova via the novaclient.
70 | # These options are for an admin user in your keystone config.
71 | # It proxy's the token received from the user to send to nova via this admin users creds,
72 | # basically acting like the client via that proxy token.
73 | nova_proxy_admin_user = admin
74 | nova_proxy_admin_pass = {{ admin_pass }}
75 | nova_proxy_admin_tenant_name = service
76 |
77 | # Manager impl for the taskmanager
78 | taskmanager_manager=trove.taskmanager.manager.Manager
79 |
80 | # Manager sends Exists Notifications
81 | exists_notification_transformer = trove.extensions.mgmt.instances.models.NovaNotificationTransformer
82 | exists_notification_ticks = 30
83 | notification_service_id = mysql:2f3ff068-2bfb-4f70-9a9d-a6bb65bc084b
84 |
85 | # Trove DNS
86 | trove_dns_support = False
87 | dns_account_id = 123456
88 | dns_auth_url = http://127.0.0.1:5000/v2.0
89 | dns_username = user
90 | dns_passkey = password
91 | dns_ttl = 3600
92 | dns_domain_name = 'trove.com.'
93 | dns_domain_id = 11111111-1111-1111-1111-111111111111
94 | dns_driver = trove.dns.designate.driver.DesignateDriver
95 | dns_instance_entry_factory = trove.dns.designate.driver.DesignateInstanceEntryFactory
96 | dns_endpoint_url = http://127.0.0.1/v1/
97 | dns_service_type = dns
98 |
99 | # Neutron
100 | network_driver = trove.network.nova.NovaNetwork
101 | default_neutron_networks =
102 |
103 | # Trove Security Groups for Instances
104 | trove_security_groups_support = True
105 | trove_security_group_rule_cidr = 0.0.0.0/0
106 |
107 | # Guest related conf
108 | agent_heartbeat_time = 10
109 | agent_call_low_timeout = 5
110 | agent_call_high_timeout = 150
111 | agent_replication_snapshot_timeout = 36000
112 |
113 | # Whether to use nova's contrib api for create server with volume
114 | use_nova_server_volume = False
115 |
116 | # Config option for filtering the IP address that DNS uses
117 | # For nova-network, set this to the appropriate network label defined in nova
118 | # For neutron, set this to .* since users can specify custom network labels
119 | # You can also optionally specify regex'es to match the actual IP addresses
120 | # ip_regex (white-list) is applied before black_list_regex in the filter chain
121 | network_label_regex = ^private$
122 | #ip_regex = ^(15.|123.)
123 | #black_list_regex = ^(10.0.0.)
124 |
125 | # Datastore templates
126 | template_path = /etc/trove/templates/
127 |
128 | # ============ Notification System configuration ===========================
129 |
130 | # Sets the notification driver used by oslo.messaging. Options include
131 | # messaging, messagingv2, log and routing. Default is 'noop'
132 | # notification_driver=noop
133 |
134 | # Topics used for OpenStack notifications, list value. Default is 'notifications'.
135 | # notification_topics=notifications
136 |
137 | # ============ Logging information =============================
138 | #log_dir = /integration/report
139 | #log_file = trove-taskmanager.log
140 |
141 | # ============ PyDev remote dubugging =============================
142 |
143 | # Enable or disable pydev remote debugging.
144 | # There are three values allowed: 'disabled', 'enabled' and 'auto'
145 | # If value is 'auto' tries to connect to remote debugger server,
146 | # but in case of error continue running with disabled debugging
147 | pydev_debug = disabled
148 |
149 | # remote debug server host and port options
150 | #pydev_debug_host = localhost
151 | #pydev_debug_port = 5678
152 |
153 | # path to pydevd library. It will be used if pydevd is absent in sys.path
154 | #pydev_path =
155 |
156 | # ================= Guestagent related ========================
157 | #guest_config = /etc/trove/trove-guestagent.conf
158 | # Use 'guest_info = /etc/guest_info' for pre-Kilo compatibility
159 | #guest_info = guest_info.conf
160 | # Use 'injected_config_location = /etc/trove' for pre-Kilo compatibility
161 | #injected_config_location = /etc/trove/conf.d
162 | #cloudinit_location = /etc/trove/cloudinit
163 |
164 | [database]
165 |
166 | # SQLAlchemy connection string for the reference implementation
167 | # registry server. Any valid SQLAlchemy connection string is fine.
168 | # See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
169 | connection = mysql://trove:{{ trove_db_password }}@{{ controller_ip }}/trove
170 |
171 |
172 | # Period in seconds after which SQLAlchemy should reestablish its connection
173 | # to the database.
174 | #
175 | # MySQL uses a default `wait_timeout` of 8 hours, after which it will drop
176 | # idle connections. This can result in 'MySQL Gone Away' exceptions. If you
177 | # notice this, you can lower this value to ensure that SQLAlchemy reconnects
178 | # before MySQL can drop the connection.
179 | idle_timeout = 3600
180 |
181 | # ================= Security groups related ========================
182 | # Each future datastore implementation should implement
183 | # its own oslo group with defined in it:
184 | # - tcp_ports; upd_ports;
185 |
186 | [profiler]
187 | # If False fully disable profiling feature.
188 | #enabled = False
189 | # If False doesn't trace SQL requests.
190 | #trace_sqlalchemy = True
191 |
192 | [oslo_messaging_rabbit]
193 | # The RabbitMQ broker address where a single node is used. (string value)
194 | # Deprecated group/name - [DEFAULT]/rabbit_host
195 | rabbit_host = {{ controller_ip }}
196 |
197 | # The RabbitMQ broker port where a single node is used. (integer value)
198 | # Deprecated group/name - [DEFAULT]/rabbit_port
199 | #rabbit_port=5672
200 |
201 | # RabbitMQ HA cluster host:port pairs. (list value)
202 | # Deprecated group/name - [DEFAULT]/rabbit_hosts
203 | #rabbit_hosts=$rabbit_host:$rabbit_port
204 |
205 | # Connect over SSL for RabbitMQ. (boolean value)
206 | # Deprecated group/name - [DEFAULT]/rabbit_use_ssl
207 | #rabbit_use_ssl=false
208 |
209 | # The RabbitMQ userid. (string value)
210 | # Deprecated group/name - [DEFAULT]/rabbit_userid
211 | rabbit_userid = {{ rabbit_user }}
212 |
213 | # The RabbitMQ password. (string value)
214 | # Deprecated group/name - [DEFAULT]/rabbit_password
215 | rabbit_password = {{ rabbit_password }}
216 |
217 | # The RabbitMQ virtual host. (string value)
218 | # Deprecated group/name - [DEFAULT]/rabbit_virtual_host
219 | #rabbit_virtual_host=/
220 |
221 | [mysql]
222 | # Format (single port or port range): A, B-C
223 | # where C greater than B
224 | tcp_ports = 3306,22
225 | volume_support = True
226 | device_path = /dev/vdb
227 |
228 | [redis]
229 | # Format (single port or port range): A, B-C
230 | # where C greater than B
231 | tcp_ports = 6379
232 | # redis uses local storage
233 | volume_support = False
234 | # default device_path = None
235 |
236 | [cassandra]
237 | tcp_ports = 7000, 7001, 9042, 9160
238 | volume_support = True
239 | device_path = /dev/vdb
240 |
241 | [couchbase]
242 | tcp_ports = 8091, 8092, 4369, 11209-11211, 21100-21199
243 | volume_support = True
244 | device_path = /dev/vdb
245 |
246 | [mongodb]
247 | volume_support = True
248 | device_path = /dev/vdb
249 |
250 | [vertica]
251 | tcp_ports = 5433, 5434, 22, 5444, 5450, 4803
252 | udp_ports = 5433, 4803, 4804, 6453
253 | volume_support = True
254 | device_path = /dev/vdb
255 | mount_point = /var/lib/vertica
256 | taskmanager_strategy = trove.common.strategies.cluster.experimental.vertica.taskmanager.VerticaTaskManagerStrategy
257 |
--------------------------------------------------------------------------------
/roles/troveserver/templates/etc/trove/trove.conf:
--------------------------------------------------------------------------------
1 | [DEFAULT]
2 |
3 | auth_strategy = keystone
4 |
5 | # Show more verbose log output (sets INFO log level output)
6 | #verbose = True
7 |
8 | # Show debugging output in logs (sets DEBUG log level output)
9 | #debug = True
10 |
11 | # Address to bind the API server
12 | #bind_host = 0.0.0.0
13 |
14 | # Port the bind the API server to
15 | #bind_port = 8779
16 |
17 | # Number of workers for the API service. The default will
18 | # be the number of CPUs available. (integer value)
19 | #trove_api_workers=None
20 |
21 | #===================== RPC Configuration =================================
22 |
23 | # URL representing the messaging driver to use and its full configuration.
24 | # If not set, we fall back to the 'rpc_backend' option and driver specific
25 | # configuration.
26 | #transport_url=
27 |
28 | # The messaging driver to use. Options include rabbit, qpid and zmq.
29 | # Default is rabbit. (string value)
30 | rpc_backend=rabbit
31 |
32 | # The default exchange under which topics are scoped. May be
33 | # overridden by an exchange name specified in the 'transport_url option.
34 | control_exchange = trove
35 |
36 | # Maximum line size of message headers to be accepted.
37 | # max_header_line may need to be increased when using large tokens
38 | # (typically those generated by the Keystone v3 API with big service
39 | # catalogs)
40 | # max_header_line = 16384
41 |
42 | #DB Api Implementation
43 | db_api_implementation = "trove.db.sqlalchemy.api"
44 |
45 | # Configuration options for talking to nova via the novaclient.
46 | trove_auth_url = http://{{ controller_ip }}:5000/v2.0
47 | nova_compute_url = http://{{ controller_ip }}:8774/v2
48 | cinder_url = http://{{ controller_ip }}:8776/v1
49 | swift_url = http://{{ controller_ip }}:8080/v1/AUTH_
50 | neutron_url = http://{{ controller_ip }}:9696/
51 |
52 | # nova_compute_url, cinder_url, swift_url, and heat_url can all be fetched
53 | # from Keystone. To fetch from Keystone, comment out nova_compute_url,
54 | # cinder_url, swift_url, and heat_url and optionally uncomment the lines below.
55 |
56 | # Region name of this node. Used when searching catalog. Default value is None.
57 | #os_region_name = RegionOne
58 | # Service type to use when searching catalog.
59 | #nova_compute_service_type = compute
60 | # Service type to use when searching catalog.
61 | #cinder_service_type = volumev2
62 | # Service type to use when searching catalog.
63 | #swift_service_type = object-store
64 | # Service type to use when searching catalog.
65 | #heat_service_type = orchestration
66 | # Service type to use when searching catalog.
67 | #neutron_service_type = network
68 |
69 | # Config option for showing the IP address that nova doles out
70 | # For nova-network, set this to the appropriate network label defined in nova
71 | # For neutron, set this to .* since users can specify custom network labels
72 | # You can also optionally specify regex'es to match the actual IP addresses
73 | # ip_regex (white-list) is applied before black_list_regex in the filter chain
74 | add_addresses = True
75 | network_label_regex = ^private$
76 | #network_label_regex = .* //with neutron enabled
77 | #ip_regex = ^(15.|123.)
78 | #black_list_regex = ^10.0.0.
79 |
80 | # Config options for enabling volume service
81 | trove_volume_support = True
82 | block_device_mapping = vdb
83 | device_path = /dev/vdb
84 | # Maximum volume size for an instance
85 | max_accepted_volume_size = 10
86 | max_instances_per_tenant = 5
87 | # Maximum volume capacity (in GB) spanning across all trove volumes per tenant
88 | max_volumes_per_tenant = 100
89 | max_backups_per_tenant = 5
90 | volume_time_out=30
91 |
92 | # Config options for rate limits
93 | http_get_rate = 200
94 | http_post_rate = 200
95 | http_put_rate = 200
96 | http_delete_rate = 200
97 | http_mgmt_post_rate = 200
98 |
99 | # Trove DNS
100 | trove_dns_support = False
101 | dns_account_id = 123456
102 | dns_auth_url = http://127.0.0.1:5000/v2.0
103 | dns_username = user
104 | dns_passkey = password
105 | dns_ttl = 3600
106 | dns_domain_name = 'trove.com.'
107 | dns_domain_id = 11111111-1111-1111-1111-111111111111
108 | dns_driver = trove.dns.designate.driver.DesignateDriver
109 | dns_instance_entry_factory = trove.dns.designate.driver.DesignateInstanceEntryFactory
110 | dns_endpoint_url = http://127.0.0.1/v1/
111 | dns_service_type = dns
112 |
113 | # Neutron
114 | network_driver = trove.network.neutron.NeutronDriver
115 | default_neutron_networks =
116 |
117 |
118 | # Taskmanager queue name
119 | taskmanager_queue = taskmanager
120 |
121 | # Auth
122 | admin_roles = admin
123 |
124 | # Guest related conf
125 | agent_heartbeat_time = 10
126 | agent_call_low_timeout = 5
127 | agent_call_high_timeout = 150
128 |
129 | # Reboot time out for instances
130 | reboot_time_out = 60
131 |
132 | # Trove api-paste file name
133 | api_paste_config = /etc/trove/api-paste.ini
134 |
135 |
136 | # ============ Notification System configuration ===========================
137 |
138 | # Sets the notification driver used by oslo.messaging. Options include
139 | # messaging, messagingv2, log and routing. Default is 'noop'
140 | # notification_driver=noop
141 |
142 | # Topics used for OpenStack notifications, list value. Default is 'notifications'.
143 | # notification_topics=notifications
144 |
145 | # ============ Logging information =============================
146 | log_dir = /var/log/trove
147 | #log_file = trove-api.log
148 |
149 |
150 | [database]
151 |
152 | # SQLAlchemy connection string for the reference implementation
153 | # registry server. Any valid SQLAlchemy connection string is fine.
154 | # See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
155 | connection = mysql://trove:{{ trove_db_password }}@{{ controller_ip }}/trove
156 |
157 | # Period in seconds after which SQLAlchemy should reestablish its connection
158 | # to the database.
159 | #
160 | # MySQL uses a default `wait_timeout` of 8 hours, after which it will drop
161 | # idle connections. This can result in 'MySQL Gone Away' exceptions. If you
162 | # notice this, you can lower this value to ensure that SQLAlchemy reconnects
163 | # before MySQL can drop the connection.
164 | idle_timeout = 3600
165 |
166 |
167 |
168 | # ============ SSL configuration (and enablement) =============================
169 | # In order to enable SSL for the trove api server, uncomment
170 | # the cert_file and key_file - and of course have those files
171 | # accessible. The existence of those setting and files will
172 | # enable SSL.
173 |
174 | [profiler]
175 | # If False fully disable profiling feature.
176 | #enabled = False
177 | # If False doesn't trace SQL requests.
178 | #trace_sqlalchemy = True
179 |
180 | [ssl]
181 |
182 | #cert_file = /path/to/server.crt
183 | #key_file = /path/to/server.key
184 | #optional:
185 | #ca_file = /path/to/ca_file
186 |
187 | [oslo_messaging_rabbit]
188 | # The RabbitMQ broker address where a single node is used. (string value)
189 | # Deprecated group/name - [DEFAULT]/rabbit_host
190 | rabbit_host = {{ controller_ip }}
191 |
192 | # The RabbitMQ broker port where a single node is used. (integer value)
193 | # Deprecated group/name - [DEFAULT]/rabbit_port
194 | #rabbit_port=5672
195 |
196 | # RabbitMQ HA cluster host:port pairs. (list value)
197 | # Deprecated group/name - [DEFAULT]/rabbit_hosts
198 | #rabbit_hosts=$rabbit_host:$rabbit_port
199 |
200 | # Connect over SSL for RabbitMQ. (boolean value)
201 | # Deprecated group/name - [DEFAULT]/rabbit_use_ssl
202 | #rabbit_use_ssl=false
203 |
204 | # The RabbitMQ userid. (string value)
205 | # Deprecated group/name - [DEFAULT]/rabbit_userid
206 | rabbit_userid = {{ rabbit_user }}
207 |
208 | # The RabbitMQ password. (string value)
209 | # Deprecated group/name - [DEFAULT]/rabbit_password
210 | rabbit_password = {{ rabbit_password }}
211 |
212 | # The RabbitMQ virtual host. (string value)
213 | # Deprecated group/name - [DEFAULT]/rabbit_virtual_host
214 | #rabbit_virtual_host=/
215 |
216 | [mysql]
217 | root_on_create = False
218 | # Format (single port or port range): A, B-C
219 | # where C greater than B
220 | tcp_ports = 3306,22
221 | volume_support = True
222 | device_path = /dev/vdb
223 |
224 | # Users to ignore for user create/list/delete operations
225 | ignore_users = os_admin, root
226 | ignore_dbs = mysql, information_schema, performance_schema
227 |
228 |
229 | [redis]
230 | tcp_ports = 6379
231 | #redis uses local storage
232 | volume_support = False
233 | # default device_path = None
234 |
235 | [cassandra]
236 | tcp_ports = 7000, 7001, 9042, 9160
237 | volume_support = True
238 | device_path = /dev/vdb
239 |
240 | [couchbase]
241 | tcp_ports = 8091, 8092, 4369, 11209-11211, 21100-21199
242 | volume_support = True
243 | device_path = /dev/vdb
244 |
245 | [mongodb]
246 | tcp_ports = 2500, 27017
247 | volume_support = True
248 | device_path = /dev/vdb
249 | num_config_servers_per_cluster = 1
250 | num_query_routers_per_cluster = 1
251 |
252 | [vertica]
253 | tcp_ports = 5433, 5434, 22, 5444, 5450, 4803
254 | udp_ports = 5433, 4803, 4804, 6453
255 | volume_support = True
256 | device_path = /dev/vdb
257 | cluster_support = True
258 | cluster_member_count = 3
259 | api_strategy = trove.common.strategies.cluster.experimental.vertica.api.VerticaAPIStrategy
260 |
261 |
262 | # ============ CORS configuration =============================
263 |
264 | [cors]
265 |
266 | #
267 | # From oslo.middleware.cors
268 | #
269 |
270 | # Indicate whether this resource may be shared with the domain received in the
271 | # requests "origin" header. (list value)
272 | #allowed_origin =
273 |
274 | # Indicate that the actual request can include user credentials (boolean value)
275 | #allow_credentials = true
276 |
277 | # Indicate which headers are safe to expose to the API. Defaults to HTTP Simple
278 | # Headers. (list value)
279 | #expose_headers = X-Auth-Token, X-Subject-Token, X-Service-Token, X-OpenStack-Request-ID
280 |
281 | # Maximum cache age of CORS preflight requests. (integer value)
282 | #max_age = 3600
283 |
284 | # Indicate which methods can be used during the actual request. (list value)
285 | #allow_methods = GET,PUT,POST,DELETE,PATCH
286 |
287 | # Indicate which header field names may be used during the actual request.
288 | # (list value)
289 | #allow_headers = X-Auth-Token, X-Identity-Status, X-Roles, X-Service-Catalog, X-User-Id, X-Tenant-Id, X-OpenStack-Request-ID
290 |
291 |
292 | [cors.subdomain]
293 |
294 | #
295 | # From oslo.middleware.cors
296 | #
297 |
298 | # Indicate whether this resource may be shared with the domain received in the
299 | # requests "origin" header. (list value)
300 | #allowed_origin =
301 |
302 | # Indicate that the actual request can include user credentials (boolean value)
303 | #allow_credentials = true
304 |
305 | # Indicate which headers are safe to expose to the API. Defaults to HTTP Simple
306 | # Headers. (list value)
307 | #expose_headers = X-Auth-Token, X-Subject-Token, X-Service-Token, X-OpenStack-Request-ID
308 |
309 | # Maximum cache age of CORS preflight requests. (integer value)
310 | #max_age = 3600
311 |
312 | # Indicate which methods can be used during the actual request. (list value)
313 | #allow_methods = GET,PUT,POST,DELETE,PATCH
314 |
315 | # Indicate which header field names may be used during the actual request.
316 | # (list value)
317 | #allow_headers = X-Auth-Token, X-Identity-Status, X-Roles, X-Service-Catalog, X-User-Id, X-Tenant-Id, X-OpenStack-Request-ID
318 |
319 |
320 | [keystone_authtoken]
321 |
322 | auth_uri = http://{{ controller_ip }}:5000
323 | auth_url = http://{{ controller_ip }}:35357
324 | auth_type = password
325 | project_domain_name = default
326 | user_domain_name = default
327 | project_name = service
328 | username = trove
329 | password = {{ trove_identity_password }}
330 |
--------------------------------------------------------------------------------
/site.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | - hosts: all
4 | become: true
5 | gather_facts: no
6 | roles:
7 | - role: 01_common
8 |
9 | - hosts: controller_nodes
10 | become: true
11 | gather_facts: no
12 | roles:
13 | - role: 02_dbserver
14 |
15 | - hosts: controller_nodes
16 | become: true
17 | gather_facts: no
18 | roles:
19 | - role: 03_dbserver_population
20 |
21 | - hosts: controller_nodes
22 | become: true
23 | gather_facts: no
24 | roles:
25 | - role: 04_rabbitserver
26 |
27 |
28 | - hosts: controller_nodes
29 | become: true
30 | gather_facts: no
31 | roles:
32 | - role: 05_etcd
33 |
34 | - hosts: all
35 | become: true
36 | gather_facts: no
37 | roles:
38 | - role: 06_openstackclient
39 |
40 | - hosts: controller_nodes
41 | become: true
42 | gather_facts: no
43 | roles:
44 | - role: 07_keystoneserver
45 |
46 | - hosts: controller_nodes
47 | become: true
48 | gather_facts: no
49 | roles:
50 | - role: 08_keystone_population
51 |
52 | - hosts: storage_nodes
53 | become: true
54 | gather_facts: no
55 | roles:
56 | - role: 09_glanceserver
57 |
58 | - hosts: controller_nodes
59 | become: true
60 | gather_facts: no
61 | roles:
62 | - role: 10_placement
63 | - hosts: controller_nodes
64 | become: true
65 | gather_facts: no
66 | roles:
67 | - role: 11_novaserver
68 | #
69 | - hosts: compute_nodes
70 | become: true
71 | gather_facts: no
72 | roles:
73 | - role: 12_novacompute
74 |
75 | - hosts: controller_nodes
76 | become: true
77 | gather_facts: no
78 | roles:
79 | - role: 13_novadiscover
80 |
81 | - hosts: controller_nodes
82 | become: true
83 | gather_facts: no
84 | roles:
85 | - role: 14_neutronserver
86 |
87 |
88 | - hosts: network_nodes
89 | become: true
90 | gather_facts: no
91 | roles:
92 | - role: 15_neutronnetwork
93 | #
94 | #
95 | - hosts: compute_nodes
96 | become: true
97 | gather_facts: no
98 | roles:
99 | - role: 16_neutroncompute
100 |
101 | - hosts: controller_nodes
102 | become: true
103 | gather_facts: no
104 | roles:
105 | - role: 17_horizon
106 |
107 | - hosts: controller_nodes
108 | become: true
109 | gather_facts: no
110 | roles:
111 | - role: 18_cinderserver
112 |
113 | - hosts: storage_nodes
114 | become: true
115 | gather_facts: no
116 | roles:
117 | - role: 19_cindervolume
118 |
119 | #- hosts: controller_nodes
120 | # become: true
121 | # gather_facts: no
122 | # roles:
123 | # - role: 20_heatserver
124 |
--------------------------------------------------------------------------------