-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from maratoid/cf_support
Cf support
- Loading branch information
Showing
17 changed files
with
659 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
{ | ||
"num_instances": 1, | ||
"vm": { | ||
"driver": { | ||
"drivertype": "cloudformation", | ||
"driveroptions": [ | ||
{ | ||
"access_key_id": "ENV['AWS_ACCESS_KEY_ID']", | ||
"secret_access_key": "ENV['AWS_SECRET_ACCESS_KEY']", | ||
"template": { | ||
"AWSTemplateFormatVersion": "2010-09-09", | ||
"Description": "AWS CloudFormation Sample Template EC2ChooseAMI: Example to show how to chose an AMI based on the region and the architecture type. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | ||
"Mappings": { | ||
"AWSInstanceType2Arch": { | ||
"c1.medium": { | ||
"Arch": "64" | ||
}, | ||
"c1.xlarge": { | ||
"Arch": "64" | ||
}, | ||
"cc1.4xlarge": { | ||
"Arch": "64HVM" | ||
}, | ||
"cc2.8xlarge": { | ||
"Arch": "64HVM" | ||
}, | ||
"cg1.4xlarge": { | ||
"Arch": "64HVM" | ||
}, | ||
"m1.large": { | ||
"Arch": "64" | ||
}, | ||
"m1.medium": { | ||
"Arch": "64" | ||
}, | ||
"m1.small": { | ||
"Arch": "64" | ||
}, | ||
"m1.xlarge": { | ||
"Arch": "64" | ||
}, | ||
"m2.2xlarge": { | ||
"Arch": "64" | ||
}, | ||
"m2.4xlarge": { | ||
"Arch": "64" | ||
}, | ||
"m2.xlarge": { | ||
"Arch": "64" | ||
}, | ||
"m3.2xlarge": { | ||
"Arch": "64" | ||
}, | ||
"m3.xlarge": { | ||
"Arch": "64" | ||
}, | ||
"t1.micro": { | ||
"Arch": "64" | ||
} | ||
}, | ||
"AWSRegionArch2AMI": { | ||
"ap-northeast-1": { | ||
"32": "ami-0644f007", | ||
"64": "ami-0a44f00b", | ||
"64HVM": "NOT_YET_SUPPORTED" | ||
}, | ||
"ap-southeast-1": { | ||
"32": "ami-b4b0cae6", | ||
"64": "ami-beb0caec", | ||
"64HVM": "NOT_YET_SUPPORTED" | ||
}, | ||
"ap-southeast-2": { | ||
"32": "ami-b3990e89", | ||
"64": "ami-bd990e87", | ||
"64HVM": "NOT_YET_SUPPORTED" | ||
}, | ||
"eu-west-1": { | ||
"32": "ami-973b06e3", | ||
"64": "ami-953b06e1", | ||
"64HVM": "NOT_YET_SUPPORTED" | ||
}, | ||
"sa-east-1": { | ||
"32": "ami-3e3be423", | ||
"64": "ami-3c3be421", | ||
"64HVM": "NOT_YET_SUPPORTED" | ||
}, | ||
"us-east-1": { | ||
"32": "ami-31814f58", | ||
"64": "ami-1b814f72", | ||
"64HVM": "ami-0da96764" | ||
}, | ||
"us-west-1": { | ||
"32": "ami-11d68a54", | ||
"64": "ami-1bd68a5e", | ||
"64HVM": "NOT_YET_SUPPORTED" | ||
}, | ||
"us-west-2": { | ||
"32": "ami-38fe7308", | ||
"64": "ami-30fe7300", | ||
"64HVM": "NOT_YET_SUPPORTED" | ||
} | ||
} | ||
}, | ||
"Outputs": { | ||
"Instance": { | ||
"Description": "DNS Name of the newly created EC2 instance", | ||
"Value": { | ||
"Fn::GetAtt": [ | ||
"Ec2Instance", | ||
"PublicDnsName" | ||
] | ||
} | ||
} | ||
}, | ||
"Parameters": { | ||
"InstanceType": { | ||
"AllowedValues": [ | ||
"t1.micro", | ||
"m1.small", | ||
"m1.medium", | ||
"m1.large", | ||
"m1.xlarge", | ||
"m2.xlarge", | ||
"m2.2xlarge", | ||
"m2.4xlarge", | ||
"m3.xlarge", | ||
"m3.2xlarge", | ||
"c1.medium", | ||
"c1.xlarge", | ||
"cc1.4xlarge", | ||
"cc2.8xlarge", | ||
"cg1.4xlarge" | ||
], | ||
"ConstraintDescription": "must be a valid EC2 instance type.", | ||
"Default": "m1.small", | ||
"Description": "WebServer EC2 instance type", | ||
"Type": "String" | ||
}, | ||
"KeyName": { | ||
"AllowedPattern": "[\\x20-\\x7E]*", | ||
"ConstraintDescription": "can contain only ASCII characters.", | ||
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the web server", | ||
"MaxLength": "255", | ||
"MinLength": "1", | ||
"Type": "String" | ||
}, | ||
"SSHLocation": { | ||
"AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})", | ||
"ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x.", | ||
"Default": "0.0.0.0/0", | ||
"Description": "The IP address range that can be used to SSH to the EC2 instances", | ||
"MaxLength": "18", | ||
"MinLength": "9", | ||
"Type": "String" | ||
} | ||
}, | ||
"Resources": { | ||
"Ec2Instance": { | ||
"Properties": { | ||
"ImageId": { | ||
"Fn::FindInMap": [ | ||
"AWSRegionArch2AMI", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
{ | ||
"Fn::FindInMap": [ | ||
"AWSInstanceType2Arch", | ||
{ | ||
"Ref": "InstanceType" | ||
}, | ||
"Arch" | ||
] | ||
} | ||
] | ||
}, | ||
"InstanceType": { | ||
"Ref": "InstanceType" | ||
}, | ||
"KeyName": { | ||
"Ref": "KeyName" | ||
}, | ||
"SecurityGroups": [ | ||
{ | ||
"Ref": "Ec2SecurityGroup" | ||
} | ||
] | ||
}, | ||
"Type": "AWS::EC2::Instance" | ||
}, | ||
"Ec2SecurityGroup": { | ||
"Properties": { | ||
"GroupDescription": "HTTP and SSH access", | ||
"SecurityGroupIngress": [ | ||
{ | ||
"CidrIp": { | ||
"Ref": "SSHLocation" | ||
}, | ||
"FromPort": "22", | ||
"IpProtocol": "tcp", | ||
"ToPort": "22" | ||
} | ||
] | ||
}, | ||
"Type": "AWS::EC2::SecurityGroup" | ||
} | ||
} | ||
}, | ||
"template_parameters": { | ||
"InstanceType": "t1.micro", | ||
"KeyName": "ENV['AWS_KEY_PAIR']", | ||
"SSHLocation": "0.0.0.0/0" | ||
} | ||
} | ||
] | ||
}, | ||
"instances": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,7 +184,7 @@ def load(needs = {}) | |
end | ||
end | ||
} | ||
|
||
return nil | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,5 @@ | |
#++ | ||
|
||
module Zerg | ||
VERSION = "0.0.7" | ||
VERSION = "0.0.8" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pkg | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
No copying restrictions/license given. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
No license given. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
Vagrant driver for Zerg | ||
=== | ||
|
||
Dependencies | ||
-------------- | ||
|
||
- [vagrant-aws](https://github.com/mitchellh/vagrant-aws) | ||
- [vagrant-libvirt](https://github.com/pradels/vagrant-libvirt) | ||
- [vagrant-omnibus](https://github.com/schisamo/vagrant-omnibus) | ||
- [vagrant-berkshelf](https://github.com/berkshelf/vagrant-berkshelf) | ||
|
||
Additional properties defined | ||
-------------- | ||
|
||
######[Synchronized folders](resources/folder_schema.template) | ||
|
||
Defined by [Vagrant synced folders](http://docs.vagrantup.com/v2/synced-folders/) | ||
|
||
Example use: | ||
``` | ||
... | ||
"create": true, | ||
"mount_options": ["rw", "vers=3", "tcp"] | ||
... | ||
``` | ||
|
||
######[Networks](resources/networks_schema.template) | ||
|
||
Defined by [Vagrant networking](http://docs.vagrantup.com/v2/networking/index.html) | ||
|
||
Example use: | ||
``` | ||
... | ||
"type": "public_network", | ||
"bridge": "en1: Wi-Fi (AirPort)" | ||
... | ||
``` | ||
|
||
######[Driver options](resources/option_schema.template) | ||
|
||
- providertype - One of the supported Vagrant providers. Currenlty supported providers are: virtualbox, libvirt, aws | ||
- provider_options - hash of provider specific options. | ||
- raw_options - if some of the provider options do not map to a hash format - you can specify them as an array of strings. Each string should start with '[provider].' | ||
|
||
Example use: | ||
``` | ||
... | ||
"driver": { | ||
"drivertype": "vagrant", | ||
"driveroptions": [ | ||
{ | ||
"providertype": "aws", | ||
"provider_options" : { | ||
"instance_type": "t1.micro", | ||
"access_key_id": "blah blah blah", | ||
"secret_access_key": "yadda yadda", | ||
"keypair_name": "HURGHBURGHLGHRL", | ||
"ami": "ami-3fec7956", | ||
"region": "us-east-1" | ||
} | ||
}, | ||
{ | ||
"providertype": "virtualbox", | ||
"provider_options" : { | ||
"gui": false, | ||
"memory": 256 | ||
}, | ||
"raw_options": [ | ||
"virtualbox.customize [\"modifyvm\", :id, \"--natdnsproxy1\", \"off\"]", | ||
"virtualbox.customize [\"modifyvm\", :id, \"--natdnshostresolver1\", \"off\"]" | ||
] | ||
} | ||
] | ||
} | ||
... | ||
``` | ||
|
||
######[Forwarded ports](resources/ports_schema.template) | ||
|
||
Defined by [Vagrant forwarded ports](http://docs.vagrantup.com/v2/networking/forwarded_ports.html) | ||
|
||
Example use: | ||
``` | ||
... | ||
"guest_port": 8080, | ||
"host_port": 80, | ||
"protocol": "tcp" | ||
... | ||
``` | ||
|
||
######[SSH](resources/ssh_schema.template) | ||
|
||
Defined by [Vagrant SSH](http://docs.vagrantup.com/v2/vagrantfile/ssh_settings.html) | ||
|
||
Example use: | ||
``` | ||
... | ||
"username": "ubuntu", | ||
"private_key_path": "PATH_TO_YOUR_PK", | ||
"shell": "bash -l" | ||
... | ||
``` | ||
|
||
######[Tasks](resources/tasks_schema.template) | ||
|
||
Describes what tasks a VM should run at provisioning step | ||
|
||
- type - Type of task payload. 'shell', 'chef_client' or 'chef_solo' | ||
- shell task parameters are defined by [Vagrant shell provisioner](http://docs.vagrantup.com/v2/provisioning/shell.html) | ||
- chef_client and chef_solo task parameters map directly to Vagrant provisioner docs, **EXCEPT the node_name parameter**: | ||
- [chef_solo provisioner](http://docs.vagrantup.com/v2/provisioning/chef_solo.html) | ||
- [chef_client provisioner](https://docs.vagrantup.com/v2/provisioning/chef_client.html) | ||
- [chef common options](http://docs.vagrantup.com/v2/provisioning/chef_common.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require "bundler/gem_tasks" |
Oops, something went wrong.