forked from UrbanCode/terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
160 lines (109 loc) · 5.7 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
**************************************************
_____ ___ ___ ___ _ ___ ___ ___ __ __
|_ _| __| _ \ _ \ /_\ | __/ _ \| _ \ \/ |
| | | _|| / / / _ \| _| (_) | / |\/| |
|_| |___|_|_\_|_\/_/ \_\_| \___/|_|_\_| |_|
**************************************************
Installation Instructions
**************************************************
Requirements:
Java 1.6
vmrun (only for VMware environments)
Maven (for building/dependencies)
To use the VMware portion of Terraform, you will need to have access to
a VCenter server.
To use the Amazon Web Services portion of Terraform, you will need to have
an AWS Account with the EC2 services. This service is free, but see Amazon
for limitations.
(to get an AWS account: https://console.aws.amazon.com/console/home )
Windows Azure with Terraform wraps around the Azure Node.js-based CLI.
That tool depends on Node.js and npm, Node's package manager.
Follow the installation instructions here to get it:
https://www.windowsazure.com/en-us/manage/linux/other-resources/command-line-tools/
Since that command line tool is only available on Unix systems,
Terraform with Azure cannot currently be run on Windows. Support for a
wrapper around the Window's based Powershell commandlets may come in the future.
To use Rackspace Next Gen Cloud Servers as your provider with Terraform,
you must have a Rackspace account and an API key. Your account must
be set up to use whatever services you are requesting.
Some services (like Cloud Networks as of 11/5/12) are in a closed beta.
Building Terraform From Source
======================================
Set your current working directory to the extracted terraform directory.
To build terraform, run:
$ mvn package
Basic Installation
======================================
You will find a shell script in terraform/bin. This is used
to run Terraform.
To run terraform, use the provided terraform script for your operating system:
Unix
./terraform [command] [input-xml-file] [input-credentials-file] [prop1=val1 prop2=val2 ...]
Windows
terraform [command] [input-xml-file] [input-credentials-file] [prop1=val1 prop2=val2 ...]
Allowed commands for all providers: create, destroy, suspend, resume
Additional allowed commands for VMware: snapshot
Amazon Web Services environments do not require any command line properties.
For more information on the AWS portion of Terraform, see the AWS section below.
Windows Azure environments do not require any command line properties.
For more information on the Azure portion of Terraform, see the Microsoft section below.
Starting a VMware environment requires specific command line properties.
See the VMware section below for more details.
Environment Templates
======================================
Environment Template examples can be found in example-config/xml-templates
A template is the structure of an environment, the blueprints. They are
formatted in xml and have a required structure to them. The root element of
every template must be <context> and must have an xmlns attribute. Underneath
the <context> must be an <environment> element.
What sits under the <environment> depends on the type of environment you want
to create. See each individual provider section below.
Properties can be used in the XML template with ${property.name}. The
properties are passed in as arguments on the command line (anything after the
3rd argument will be interpreted as a property).
e.g. if you set uDeploy.host=12.34.56.78 and uDeploy.port=7918, you can
then use these with
<param value="${uDeploy.host}"/> <param value="${uDeploy.host}"/>
Some properties are defined by the provider. See each provider's section
below (VMware / AWS / Microsoft).
Conf File Information
======================================
[ Global ]
* log4j.properties
Located in the $TERRAFORM_HOME/conf folder.
This file contains the properties used to configure logging.
[ AWS ]
[ VMware ]
* ippool.conf
Located in the $TERRAFORM_HOME/conf folder.
Contains the start and end points for the IP pool used by vCenter.
The start is the begining IP address to start allocating for VMs.
It should be in the following format:
start=192.168.2.1
end=192.168.2.250
The files below are created in an environment-specific $TERRAFORM_HOME/temp
folder and deleted when the environment is deleted.
* .temp files - these are the beginning forms of the conf files listed below.
Content is added to them and placed in the appropriate conf file.
The following files are packaged with Terraform for use with VMWare.
* dhcpd.conf
This is the standard DHCPD configuration file for dhcpd, the Internet Systems
Consortium DHCP Server.
See http://linux.die.net/man/5/dhcpd.conf
* interfaces
This is a debian/ubuntu networking configuration file for the interfaces on
the router machine.
See http://support.arpnetworks.com/kb/vps/example-etcnetworkinterfaces-for-debian-and-ubuntu
* iptables.conf
This is the standard iptables configuration file for configuring a firewall
and allowable network traffic.
See http://linux.die.net/man/8/iptables
* isc-dhcp-server
This file indicates which network interfaces will be serving up DHCP
addresses. It is typically located in /etc/default and referenced by
/etc/init.d/isc-dhcp-server .
The only required content of this file is one line, as below
INTERFACES="eth1 eth2"
Quotation marks included. All network interfaces to be served DHCP addresses
should be listed, separated by one space.
======================================