Skip to content

Commit 43d1e14

Browse files
authored
Merge pull request #15 from khos2ow/update-readme
Update README and fix lint issues
2 parents cdf1ea1 + 654dc54 commit 43d1e14

File tree

1 file changed

+50
-51
lines changed

1 file changed

+50
-51
lines changed

README.md

+50-51
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,58 @@
1-
cloudstack Cookbook
2-
===================
1+
# CloudStack Cookbook
32

43
Install and configure [Apache Cloudstack](http://cloudstack.apache.org) using [Chef](http://www.chef.io/). A wrapper cookbook is prefered in order to Install Apache CloudStack properly, refer to [cloudstack_wrapper cookbook](https://github.com/cloudops/cookbook_cloudstack_wrapper) for example.
54

6-
75
Work with Chef 12 only.
86

97
Tested on CentOS 7 and Ubuntu 16.04
108

11-
12-
About Apache Cloudstack
13-
-----------------------
9+
## Table of Contents
10+
11+
- [About Apache Cloudstack](#about-apache-cloudstack)
12+
- [Requirements](#requirements)
13+
- [Cookbooks](#cookbooks)
14+
- [Resources / Providers](#resources-providers)
15+
- [cloudstack_setup_database](#cloudstack_setup_database)
16+
- [cloudstack_system_template](#cloudstack_system_template)
17+
- [cloudstack_setup_management](#cloudstack_setup_management)
18+
- [cloudstack_api_keys](#cloudstack_api_keys)
19+
- [cloudstack_global_setting](#cloudstack_global_setting)
20+
- [Recipes](#recipes)
21+
- [cloudstack::management_server](#cloudstackmanagement_server)
22+
- [cloudstack::usage](#cloudstackusage)
23+
- [cloudstack::kvm_agent](#cloudstackkvm_agent)
24+
- [cloudstack::vhd-util](#cloudstackvhd-util)
25+
- [cloudstack::mysql_conf](#cloudstackmysql_conf)
26+
- [cloudstack::eventbus](#cloudstackeventbus)
27+
- [cloudstack::default](#cloudstackdefault)
28+
- [Attributes](#attributes)
29+
- [Contributing](#contributing)
30+
- [License and Authors](#license-and-authors)
31+
32+
## About Apache Cloudstack
1433

1534
Apache CloudStack is open source software designed to deploy and manage large networks of virtual machines, as a highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform.
1635

1736
More info on: http://cloudstack.apache.org/
1837

19-
Requirements
20-
------------
38+
## Requirements
39+
40+
### Cookbooks
2141

22-
#### cookbooks
2342
- `yum` - packages management
2443
- `apt` - packages management
2544
- `mysql` - for MySQL database server and client
2645
- `sudo` - to configure sudoers for user "cloud"
2746

2847
There is a dependency on Ruby gem [cloudstack_ruby_client](https://github.com/chipchilders/cloudstack_ruby_client) for chef which is handle in `recipe[cloudstack::default]`.
2948

30-
Resources/Providers
31-
-------------------
49+
## Resources / Providers
3250

3351
### cloudstack_setup_database
3452

3553
Create MySQL database and connection configuration used by CloudStack management-server using `/usr/bin/cloudstack-setup-databases` utility.
3654

37-
#### Examples
38-
39-
``` ruby
55+
```ruby
4056
# Using attributes
4157
cloudstack_setup_database node["cloudstack"]["db"]["host"] do
4258
root_user node["cloudstack"]["db"]["rootusername"]
@@ -58,9 +74,7 @@ end
5874

5975
Download initial SystemVM template prior to initialize a CloudStack Region. cloudstack_system_template require access to CloudStack database which must be initated before executing this ressource. If no URL is provided cloudstack_system_template will use the default URL from the database if available to download the template.
6076

61-
#### Examples
62-
63-
``` ruby
77+
```ruby
6478
# Using attributes
6579
cloudstack_system_template 'xenserver' do
6680
url node['cloudstack']['systemvm']['xenserver']
@@ -71,19 +85,20 @@ cloudstack_system_template 'xenserver' do
7185
db_host node["cloudstack"]["db"]["host"]
7286
end
7387
```
88+
7489
Which is equivalent to:
7590

76-
``` bash
91+
```bash
7792
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt \
78-
-m /mnt/secondary \
79-
-u http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-xen.vhd.bz2 \
80-
-h xenserver \
81-
-F
93+
-m /mnt/secondary \
94+
-u http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-xen.vhd.bz2 \
95+
-h xenserver \
96+
-F
8297
```
8398

84-
Simpler example:
99+
Simpler example:
85100

86-
``` ruby
101+
```ruby
87102
# Using URL from CloudStack database
88103
cloudstack_system_template 'kvm' do
89104
end
@@ -102,11 +117,10 @@ cloudstack_setup_management node.name
102117
Generate api keys for account. Currently working only for admin account.
103118

104119
Will update attributes:
120+
105121
- `node["cloudstack"]["admin"]["api_key"]`
106122
- `node["cloudstack"]["admin"]["secret_key"]`
107123

108-
#### examples
109-
110124
``` ruby
111125
# Create API key if now exist in Cloudstack and update node attributes
112126
cloudstack_api_keys "admin" do
@@ -125,19 +139,14 @@ end
125139

126140
Update Global Settings values.
127141

128-
#### examples
129-
130142
``` ruby
131143
cloudstack_global_setting "expunge.delay" do
132144
value "80"
133145
notifies :restart, "service[cloudstack-management]", :delayed
134146
end
135147
```
136148

137-
138-
Recipes
139-
-------
140-
149+
## Recipes
141150

142151
### cloudstack::management_server
143152

@@ -146,52 +155,43 @@ install CloudStack because of dependency such as MySQL server and system VM
146155
templates. Refer to [cloudstack_wrapper cookbook](https://github.com/cloudops/cookbook_cloudstack_wrapper)
147156
to install a fully working CloudStack management-server.
148157

149-
150158
### cloudstack::usage
151159

152160
Install, enable and start cloudstack-usage. cloudstack-usage is usefull to collect resource usage from account. This recipe make sure cloudstack-usage run on a cloudstack-management server as it is required.
153161

154-
155162
### cloudstack::kvm_agent
156163

157164
Install, enable and start KVM cloudstack-agent. KVM host managed by CloudStack require an agent. This recipe install cloudstack-agent required on a KVM server.
158165

159166
Support Ubuntu and CentOS/RHEL KVM server.
160167

161-
162168
### cloudstack::vhd-util
163169

164170
Download the tool vhd-util which is not include in CloudStack packages and required to manage XenServer hosts.
165171

166-
167172
### cloudstack::mysql_conf
168173

169174
MySQL tunning based on official CloudStack documentation.
170175

171-
172176
### cloudstack::eventbus
173177

174178
Configure CloudStack to send Events into RabbitMQ message bus. Work for CloudStack 4.3 and latest. RabbitMQ must be installed and configured somewhere, default values are for localhost.
175179

176-
177180
### cloudstack::default
178181

179182
Chef Required dependencies in order to interact with CloudStack.
180183

181-
182-
Attributes
183-
----------
184+
## Attributes
184185

185186
Attributes can be customized. The cookbook does not support encrypted data bag usage for now.
186187

187-
- <tt>node['cloudstack']['yum_repo']</tt> - yum repo url to use, default: http://cloudstack.apt-get.eu/rhel/4.3/
188-
- <tt>node['cloudstack']['apt_repo']</tt> - apt repo url to use, default: http://cloudstack.apt-get.eu/ubuntu
189-
- <tt>node['cloudstack']['release_major']</tt> - Major CloudStack release ex: 4.3 or 4.2
190-
- <tt>node['cloudstack']['version']</tt> - Package version ex: 4.2.1-1.el6
188+
- `node['cloudstack']['yum_repo']` - YUM repo URL to use, default: http://cloudstack.apt-get.eu/rhel/4.3/
189+
- `node['cloudstack']['apt_repo']` - APT repo URL to use, default: http://cloudstack.apt-get.eu/ubuntu
190+
- `node['cloudstack']['release_major']` - Major CloudStack release ex: 4.3 or 4.2
191+
- `node['cloudstack']['version']` - Package version ex: 4.2.1-1.el6
191192

193+
## Contributing
192194

193-
Contributing
194-
------------
195195
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
196196

197197
e.g.
@@ -203,18 +203,17 @@ e.g.
203203
5. Run the tests, ensuring they all pass
204204
6. Submit a Pull Request using Github
205205

206+
## License and Authors
206207

207-
License and Authors
208-
-------------------
209208
- Author:: Pierre-Luc Dion (<[email protected]>)
210-
- Author:: Khosrow Moossavi ([email protected])
209+
- Author:: Khosrow Moossavi (<[email protected]>)
211210

212211
Some snippets have been taken from: [schubergphilis/cloudstack-cookbook](https://github.com/schubergphilis/cloudstack-cookbook)
212+
213213
- Author:: Roeland Kuipers (<[email protected]>)
214214
- Author:: Sander Botman (<[email protected]>)
215215
- Author:: Hugo Trippaers (<[email protected]>)
216216

217-
218217
```text
219218
Copyright:: Copyright (c) 2018 CloudOps Inc.
220219

0 commit comments

Comments
 (0)