vagrant-tiktalik 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +110 -165
- data/box/metadata.json +1 -1
- data/box/tiktalik.box +0 -0
- data/lib/vagrant-tiktalik/action/power_off.rb +1 -0
- data/lib/vagrant-tiktalik/action/power_on.rb +1 -0
- data/lib/vagrant-tiktalik/action/read_ssh_info.rb +1 -0
- data/lib/vagrant-tiktalik/action/read_state.rb +1 -0
- data/lib/vagrant-tiktalik/action/run_instance.rb +1 -0
- data/lib/vagrant-tiktalik/action/terminate_instance.rb +1 -0
- data/lib/vagrant-tiktalik/config.rb +3 -0
- data/lib/vagrant-tiktalik/plugin.rb +2 -2
- data/lib/vagrant-tiktalik/version.rb +1 -1
- data/vagrant-tiktalik.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f456716376d5e63c7b37333c0ccc1f639bdd53cf
|
4
|
+
data.tar.gz: 407f7c942914a6f10a74f873381bdf68e924b67b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1466932aa634bfc17b8f460dd3385988c70b44fe280a4d7b9762471690bfec28425453d0e875ea56964a724cdaa413953869528ce32f64cd8afca41da3bc0db1
|
7
|
+
data.tar.gz: f7219b9d4a3797d94a9f050948bdf3f55e52c9b2bbe21044e36b2e7d9cbba337ad2f8e734673b1dd0e14a2edc281d6ee55ccfd5bdd43987728012176c9db375c
|
data/README.md
CHANGED
@@ -1,84 +1,127 @@
|
|
1
|
-
#
|
1
|
+
# Vagrant Tiktalik.com Provider
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Don't forget you that our plugin is called vagrant-tiktalik so please adapt commands accordingly.
|
6
|
-
|
7
|
-
``
|
8
|
-
$ vagrant plugin install vagrant-tiktalik
|
9
|
-
...
|
10
|
-
$ vagrant up --provider=tiktalik
|
11
|
-
``
|
12
|
-
|
13
|
-
# Vagrant AWS Provider
|
14
|
-
|
15
|
-
This is a [Vagrant](http://www.vagrantup.com) 1.2+ plugin that adds an [AWS](http://aws.amazon.com)
|
16
|
-
provider to Vagrant, allowing Vagrant to control and provision machines in
|
17
|
-
EC2 and VPC.
|
3
|
+
This is a [Vagrant](http://www.vagrantup.com) 1.2+ plugin that adds an [Tiktalik.com](https://tiktalik.com)
|
4
|
+
provider to Vagrant, allowing Vagrant to control and provision machines in Tiktalik cloud.
|
18
5
|
|
19
6
|
**NOTE:** This plugin requires Vagrant 1.2+,
|
20
7
|
|
21
8
|
## Features
|
22
9
|
|
23
|
-
* Boot
|
10
|
+
* Boot Tiktalik instances.
|
24
11
|
* SSH into the instances.
|
25
|
-
* Provision the instances with any built-in Vagrant provisioner.
|
12
|
+
* Provision the instances with any built-in Vagrant provisioner, ie. ansible
|
26
13
|
* Minimal synced folder support via `rsync`.
|
27
|
-
* Define region-specifc configurations so Vagrant can manage machines
|
28
|
-
in multiple regions.
|
29
14
|
|
30
15
|
## Usage
|
31
16
|
|
32
|
-
Install using standard Vagrant 1.1+ plugin installation methods.
|
33
|
-
installing, `vagrant up` and specify the `aws` provider. An example is
|
34
|
-
shown below.
|
17
|
+
Install using standard Vagrant 1.1+ plugin installation methods.
|
35
18
|
|
36
19
|
```
|
37
|
-
$ vagrant plugin install vagrant-
|
38
|
-
|
39
|
-
|
40
|
-
|
20
|
+
$ vagrant plugin install vagrant-tiktalik
|
21
|
+
|
22
|
+
Installing the 'vagrant-tiktalik' plugin. This can take a few minutes...
|
23
|
+
Installed the plugin 'vagrant-tiktalik (0.0.1)'!
|
41
24
|
```
|
42
25
|
|
43
|
-
|
26
|
+
After installing, run `vagrant up` and specify the `tiktalik` provider.
|
27
|
+
|
28
|
+
```
|
29
|
+
$ vagrant up --provider=tiktalik
|
30
|
+
|
31
|
+
Bringing machine 'default' up with 'tiktalik' provider...
|
32
|
+
[default] Launching an instance with the following settings...
|
33
|
+
[default] -- Image: 4a2b3e72-47f1-4e88-b482-1834478ade28
|
34
|
+
[default] -- Hostname: vagrant-default
|
35
|
+
[default] -- Size: 0.5
|
36
|
+
[default] -- SSH key: d5c6b671-6cba-41fe-9020-5d5e1dda85f9
|
37
|
+
[default] -- Networks: ["212c7fd1-6018-41ff-9a01-a37956517237"]
|
38
|
+
[default] Waiting for instance to become "ready"...
|
39
|
+
[default] Waiting for SSH to become available...
|
40
|
+
[default] Machine is booted and ready for use!
|
41
|
+
[default] Rsyncing folder: /root/f/ => /vagrant
|
42
|
+
```
|
43
|
+
|
44
|
+
Of course prior to doing this, you'll need to obtain an Tiktalik-compatible
|
44
45
|
box file for Vagrant.
|
45
46
|
|
47
|
+
## SSL issues
|
48
|
+
|
49
|
+
If you get the following error:
|
50
|
+
|
51
|
+
```
|
52
|
+
connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Faraday::Error::ConnectionFailed)
|
53
|
+
```
|
54
|
+
|
55
|
+
It means that you are missing root certificates, at least ruby is missing them.
|
56
|
+
|
57
|
+
This problem has been described on Faraday's (a vagrant-tiktalik and tiktalik-ruby dependency) wiki:
|
58
|
+
|
59
|
+
[https://github.com/lostisland/faraday/wiki/Setting-up-SSL-certificates](https://github.com/lostisland/faraday/wiki/Setting-up-SSL-certificates)
|
60
|
+
|
61
|
+
The quick fix is to:
|
62
|
+
|
63
|
+
* set SSL_CERT_FILE environment variable and point it to Certificate Authority (CA) file. Please note that CA file might not be installed on your system and the actuall file path might differ!
|
64
|
+
|
65
|
+
```
|
66
|
+
$ SSL_CERT_FILE=/opt/vagrant/embedded/cacert.pem vagrant status
|
67
|
+
```
|
68
|
+
* set CA file path as a provider configuration variable in Vagrantfile. Please see sample configuration file below.
|
69
|
+
|
70
|
+
|
46
71
|
## Quick Start
|
47
72
|
|
48
73
|
After installing the plugin (instructions above), the quickest way to get
|
49
|
-
started is to actually use a dummy
|
74
|
+
started is to actually use a dummy Tiktalik box and specify all the details
|
50
75
|
manually within a `config.vm.provider` block. So first, add the dummy
|
51
76
|
box using any name you want:
|
52
77
|
|
53
78
|
```
|
54
|
-
$ vagrant box add dummy https://github.com/
|
55
|
-
|
79
|
+
$ vagrant box add dummy https://github.com/tiktalik-cloud/vagrant-tiktalik/raw/master/box/tiktalik.box
|
80
|
+
|
81
|
+
Downloading or copying the box...
|
82
|
+
Extracting box...e: 0/s, Estimated time remaining: --:--:--)
|
83
|
+
Successfully added box 'dummy' with provider 'tiktalik'!
|
56
84
|
```
|
57
85
|
|
58
86
|
And then make a Vagrantfile that looks like the following, filling in
|
59
87
|
your information where necessary.
|
60
88
|
|
61
|
-
```
|
62
|
-
Vagrant.configure(
|
63
|
-
config.vm.
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
override.
|
73
|
-
|
89
|
+
```ruby
|
90
|
+
Vagrant.configure('2') do |config|
|
91
|
+
config.vm.provider :tiktalik do |provider, override|
|
92
|
+
# path to private ssh key, public one has to me uploaded to
|
93
|
+
# tiktalik.com and it's UUID provided below as `provider.ssh_key`
|
94
|
+
# please note that DSA key will work just fine
|
95
|
+
override.ssh.private_key_path = '~/.ssh/id_rsa'
|
96
|
+
|
97
|
+
override.vm.box = 'tiktalik'
|
98
|
+
|
99
|
+
# hostname for your instance, ie vagrant-host.youraccount.p2.tiktalik.com
|
100
|
+
# override.vm.hostname = 'vagrant-host'
|
101
|
+
|
102
|
+
# api credentials, get them from https://tiktalik.com/panel/#apikeys
|
103
|
+
provider.api_key = 'api key'
|
104
|
+
provider.api_secret = 'api secret'
|
105
|
+
|
106
|
+
# system image UUID, this one is for Ubuntu 12.04.3 LTS 64-bit
|
107
|
+
# get more ids from https://tiktalik.com/panel/#templates
|
108
|
+
provider.image = '4a2b3e72-47f1-4e88-b482-1834478ade28'
|
109
|
+
|
110
|
+
# in case of SSL related problems (ie. ruby 1.9 missing CA file)
|
111
|
+
# uncomment following line. don't forget to provide valid CA file path.
|
112
|
+
# on Ubuntu, CA file comes with Vagrant deb package
|
113
|
+
# provider.ca_file = '/opt/vagrant/embedded/cacert.pem'
|
114
|
+
|
115
|
+
# your SSH key UUID, get one from https://tiktalik.com/panel/#sshkeys
|
116
|
+
provider.ssh_key = 'here goes ssh key uuid'
|
74
117
|
end
|
75
118
|
end
|
76
119
|
```
|
77
120
|
|
78
|
-
And then run `vagrant up --provider=
|
121
|
+
And then run `vagrant up --provider=tiktalik`.
|
79
122
|
|
80
|
-
This will start an Ubuntu 12.04 instance
|
81
|
-
|
123
|
+
This will start an Ubuntu 12.04 instance within your account.
|
124
|
+
And assuming your SSH information was filled in properly
|
82
125
|
within your Vagrantfile, SSH and provisioning will work as well.
|
83
126
|
|
84
127
|
Note that normally a lot of this boilerplate is encoded within the box
|
@@ -88,143 +131,41 @@ no preconfigured defaults.
|
|
88
131
|
If you have issues with SSH connecting, make sure that the instances
|
89
132
|
are being launched with a security group that allows SSH access.
|
90
133
|
|
91
|
-
## Box Format
|
92
|
-
|
93
|
-
Every provider in Vagrant must introduce a custom box format. This
|
94
|
-
provider introduces `aws` boxes. You can view an example box in
|
95
|
-
the [example_box/ directory](https://github.com/mitchellh/vagrant-aws/tree/master/example_box).
|
96
|
-
That directory also contains instructions on how to build a box.
|
97
|
-
|
98
|
-
The box format is basically just the required `metadata.json` file
|
99
|
-
along with a `Vagrantfile` that does default settings for the
|
100
|
-
provider-specific configuration for this provider.
|
101
|
-
|
102
134
|
## Configuration
|
103
135
|
|
104
136
|
This provider exposes quite a few provider-specific configuration options:
|
105
137
|
|
106
|
-
* `
|
107
|
-
|
108
|
-
* `
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
* `
|
115
|
-
|
116
|
-
* `private_ip_address` - The private IP address to assign to an instance
|
117
|
-
within a [VPC](http://aws.amazon.com/vpc/)
|
118
|
-
* `region` - The region to start the instance in, such as "us-east-1"
|
119
|
-
* `secret_access_key` - The secret access key for accessing AWS
|
120
|
-
* `security_groups` - An array of security groups for the instance. If this
|
121
|
-
instance will be launched in VPC, this must be a list of security group
|
122
|
-
IDs.
|
123
|
-
* `subnet_id` - The subnet to boot the instance into, for VPC.
|
124
|
-
* `tags` - A hash of tags to set on the machine.
|
125
|
-
* `use_iam_profile` - If true, will use [IAM profiles](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
|
126
|
-
for credentials.
|
127
|
-
|
128
|
-
These can be set like typical provider-specific configuration:
|
129
|
-
|
130
|
-
```ruby
|
131
|
-
Vagrant.configure("2") do |config|
|
132
|
-
# ... other stuff
|
133
|
-
|
134
|
-
config.vm.provider :aws do |aws|
|
135
|
-
aws.access_key_id = "foo"
|
136
|
-
aws.secret_access_key = "bar"
|
137
|
-
end
|
138
|
-
end
|
139
|
-
```
|
140
|
-
|
141
|
-
In addition to the above top-level configs, you can use the `region_config`
|
142
|
-
method to specify region-specific overrides within your Vagrantfile. Note
|
143
|
-
that the top-level `region` config must always be specified to choose which
|
144
|
-
region you want to actually use, however. This looks like this:
|
145
|
-
|
146
|
-
```ruby
|
147
|
-
Vagrant.configure("2") do |config|
|
148
|
-
# ... other stuff
|
149
|
-
|
150
|
-
config.vm.provider :aws do |aws|
|
151
|
-
aws.access_key_id = "foo"
|
152
|
-
aws.secret_access_key = "bar"
|
153
|
-
aws.region = "us-east-1"
|
154
|
-
|
155
|
-
# Simple region config
|
156
|
-
aws.region_config "us-east-1", :ami => "ami-12345678"
|
157
|
-
|
158
|
-
# More comprehensive region config
|
159
|
-
aws.region_config "us-west-2" do |region|
|
160
|
-
region.ami = "ami-87654321"
|
161
|
-
region.keypair_name = "company-west"
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
```
|
166
|
-
|
167
|
-
The region-specific configurations will override the top-level
|
168
|
-
configurations when that region is used. They otherwise inherit
|
169
|
-
the top-level configurations, as you would probably expect.
|
138
|
+
* `image` - System image UUID, full list available at:
|
139
|
+
https://tiktalik.com/panel/#templates
|
140
|
+
* `size` - Instance size, ie. 0.25, 0.5, 1, ...
|
141
|
+
Check out our pricing list for other sizes:
|
142
|
+
https://tiktalik.com/pricing#unit/2
|
143
|
+
* `ssh_key` - SSH key UUID. Key has to be uploaded beforehand.
|
144
|
+
Admin panel URL is https://tiktalik.com/panel/#sshkeys
|
145
|
+
* `api_key` - API key and ...
|
146
|
+
* `api_secret` - ... secret are required API creditentials.
|
147
|
+
Go to admin panel to get them: https://tiktalik.com/panel/#apikeys
|
170
148
|
|
171
149
|
## Networks
|
172
150
|
|
173
151
|
Networking features in the form of `config.vm.network` are not
|
174
|
-
supported with `vagrant-
|
152
|
+
supported with `vagrant-tiktalik`, currently. If any of these are
|
175
153
|
specified, Vagrant will emit a warning, but will otherwise boot
|
176
|
-
the
|
154
|
+
the Tiktalik instance.
|
177
155
|
|
178
156
|
## Synced Folders
|
179
157
|
|
180
158
|
There is minimal support for synced folders. Upon `vagrant up`,
|
181
|
-
`vagrant reload`, and `vagrant provision`, the
|
159
|
+
`vagrant reload`, and `vagrant provision`, the Tiktalik provider will use
|
182
160
|
`rsync` (if available) to uni-directionally sync the folder to
|
183
161
|
the remote machine over SSH.
|
184
162
|
|
185
163
|
This is good enough for all built-in Vagrant provisioners (shell,
|
186
164
|
chef, and puppet) to work!
|
187
165
|
|
188
|
-
## Other Examples
|
189
|
-
|
190
|
-
### Tags
|
191
|
-
|
192
|
-
To use tags, simply define a hash of key/value for the tags you want to associate to your instance, like:
|
193
|
-
|
194
|
-
```ruby
|
195
|
-
Vagrant.configure("2") do |config|
|
196
|
-
# ... other stuff
|
197
|
-
|
198
|
-
config.vm.provider "aws" do |aws|
|
199
|
-
aws.tags = {
|
200
|
-
'Name' => 'Some Name',
|
201
|
-
'Some Key' => 'Some Value'
|
202
|
-
}
|
203
|
-
end
|
204
|
-
end
|
205
|
-
```
|
206
|
-
|
207
|
-
### User data
|
208
|
-
|
209
|
-
You can specify user data for the instance being booted.
|
210
|
-
|
211
|
-
```ruby
|
212
|
-
Vagrant.configure("2") do |config|
|
213
|
-
# ... other stuff
|
214
|
-
|
215
|
-
config.vm.provider "aws" do |aws|
|
216
|
-
# Option 1: a single string
|
217
|
-
aws.user_data = "#!/bin/bash\necho 'got user data' > /tmp/user_data.log\necho"
|
218
|
-
|
219
|
-
# Option 2: use a file
|
220
|
-
aws.user_data = File.read("user_data.txt")
|
221
|
-
end
|
222
|
-
end
|
223
|
-
```
|
224
|
-
|
225
166
|
## Development
|
226
167
|
|
227
|
-
To work on the `vagrant-
|
168
|
+
To work on the `vagrant-tiktalik` plugin, clone this repository out, and use
|
228
169
|
[Bundler](http://gembundler.com) to get the dependencies:
|
229
170
|
|
230
171
|
```
|
@@ -242,9 +183,13 @@ the plugin without installing it into your Vagrant environment by just
|
|
242
183
|
creating a `Vagrantfile` in the top level of this directory (it is gitignored)
|
243
184
|
and add the following line to your `Vagrantfile`
|
244
185
|
```ruby
|
245
|
-
Vagrant.require_plugin "vagrant-
|
186
|
+
Vagrant.require_plugin "vagrant-tiktalik"
|
246
187
|
```
|
247
188
|
Use bundler to execute Vagrant:
|
248
189
|
```
|
249
|
-
$ bundle exec vagrant up --provider=
|
190
|
+
$ bundle exec vagrant up --provider=tiktalik
|
250
191
|
```
|
192
|
+
|
193
|
+
## Thanks
|
194
|
+
|
195
|
+
Our plugin is based on excellent Vagrant AWS Provider plugin.
|
data/box/metadata.json
CHANGED
data/box/tiktalik.box
CHANGED
Binary file
|
@@ -8,6 +8,7 @@ module VagrantPlugins
|
|
8
8
|
attr_accessor :size
|
9
9
|
attr_accessor :ssh_key
|
10
10
|
attr_accessor :api_secret
|
11
|
+
attr_accessor :ca_file
|
11
12
|
#attr_accessor :network
|
12
13
|
|
13
14
|
def initialize
|
@@ -16,6 +17,7 @@ module VagrantPlugins
|
|
16
17
|
@size = UNSET_VALUE
|
17
18
|
@ssh_key = UNSET_VALUE
|
18
19
|
@api_secret = UNSET_VALUE
|
20
|
+
@ca_file = UNSET_VALUE
|
19
21
|
#@network = UNSET_VALUE
|
20
22
|
end
|
21
23
|
|
@@ -25,6 +27,7 @@ module VagrantPlugins
|
|
25
27
|
@size = 0.5 if @size == UNSET_VALUE
|
26
28
|
@ssh_key = nil if @ssh_key == UNSET_VALUE
|
27
29
|
@api_secret = ENV['TIKTALIK_API_SECRET'] if @api_secret == UNSET_VALUE
|
30
|
+
@ca_file = nil if @ca_file == UNSET_VALUE
|
28
31
|
#@network = nil if @network == UNSET_VALUE
|
29
32
|
end
|
30
33
|
|
@@ -19,12 +19,12 @@ module VagrantPlugins
|
|
19
19
|
machines in Tiktalik.com.
|
20
20
|
DESC
|
21
21
|
|
22
|
-
config(:
|
22
|
+
config(:tiktalik, :provider) do
|
23
23
|
require_relative "config"
|
24
24
|
Config
|
25
25
|
end
|
26
26
|
|
27
|
-
provider(:
|
27
|
+
provider(:tiktalik, parallel: true) do
|
28
28
|
# Setup logging and i18n
|
29
29
|
setup_logging
|
30
30
|
setup_i18n
|
data/vagrant-tiktalik.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.rubyforge_project = "vagrant-tiktalik"
|
17
17
|
|
18
18
|
# s.add_runtime_dependency "fog", "~> 1.10.0"
|
19
|
-
s.add_runtime_dependency "tiktalik", "~> 1.0.
|
19
|
+
s.add_runtime_dependency "tiktalik", "~> 1.0.4"
|
20
20
|
|
21
21
|
s.add_development_dependency "rake"
|
22
22
|
s.add_development_dependency "rspec-core", "~> 2.12.2"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-tiktalik
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksander Piotrowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tiktalik
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.
|
19
|
+
version: 1.0.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0.
|
26
|
+
version: 1.0.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|