Skip to content

Commit 5bde1ef

Browse files
Added centos, debian to AWS kitchen + switch to ruby_rbenv and plugin rvm download to download ruby
1 parent 7b5a9ae commit 5bde1ef

File tree

4 files changed

+35
-43
lines changed

4 files changed

+35
-43
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ bin/*
1818

1919
.kitchen/
2020
.kitchen*.local.yml
21+
*.local.*

.kitchen-aws.yml

Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,51 @@
11
---
22
driver:
33
name: ec2
4-
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
5-
shared_credentials_profile: <%= ENV['AWS_PROFILE'] %>
6-
security_group_ids: ["sg-0000000"]
74
region: us-east-1
8-
availability_zone: e
95
require_chef_omnibus: true
10-
subnet_id: subnet-00000000
11-
iam_profile_name: CodeDeploy
12-
iam_profile_name: CodeDeployGitHubDemo
136
associate_public_ip: true
7+
aws_ssh_key_id: key-pairs
8+
security_group_ids: ["sg-000000"]
149
interface: dns
1510

1611
transport:
17-
ssh_key: ~/.ssh/aws-codedeploy-agent-cookbook.pem
12+
ssh_key: ~/.ssh/key-pairs.pem
1813
connection_timeout: 10
1914
connection_retries: 5
2015
username: ubuntu
2116

2217
platforms:
18+
- name: ubuntu-16.04-aws
19+
driver:
20+
image_id: ami-c45b54ae
21+
instance_type: t2.micro
2322
- name: ubuntu-14.04-aws
2423
driver:
25-
image_id: ami-d05e75b8
26-
instance_type: m3.medium
27-
block_device_mappings:
28-
- ebs_device_name: /dev/sda1
29-
ebs_volume_type: gp2
30-
ebs_virtual_name: test
31-
ebs_volume_size: 8
32-
ebs_delete_on_termination: true
24+
image_id: ami-d05e75b8
25+
instance_type: t2.micro
3326
- name: ubuntu-12.04-aws
3427
driver:
3528
image_id: ami-81fb34ea
36-
block_device_mappings:
37-
- ebs_device_name: /dev/sda1
38-
ebs_volume_type: gp2
39-
ebs_virtual_name: test
40-
ebs_volume_size: 8
41-
ebs_delete_on_termination: true
29+
instance_type: t2.micro
4230
- name: debian-8-aws
4331
driver:
44-
image_id: ami-8b9a63e0
45-
block_device_mappings:
46-
- ebs_device_name: /dev/xvda
47-
ebs_volume_type: gp2
48-
ebs_virtual_name: test
49-
ebs_volume_size: 8
50-
ebs_delete_on_termination: true
32+
image_id: ami-8e9ca3e4
33+
instance_type: t2.micro
5134
transport:
5235
username: admin
53-
- name: amazon-linux
36+
- name: centos-7-aws
5437
driver:
55-
image_id: ami-1ecae776
38+
image_id: ami-6d1c2007
5639
instance_type: t2.micro
57-
block_device_mappings:
58-
- ebs_device_name: /dev/sdb
59-
ebs_volume_type: gp2
60-
ebs_virtual_name: test
61-
ebs_volume_size: 8
62-
ebs_delete_on_termination: true
6340
transport:
64-
username: ec2-user
41+
username: centos
42+
- name: amazon-linux
43+
driver:
44+
image_id: ami-1ecae776
45+
instance_type: t2.micro
46+
transport:
47+
username: ec2-user
48+
6549
suites:
6650
- name: aws-codedeploy-agent
6751
run_list:

recipes/default.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
end
6060

6161
when 'centos'
62-
%w(unzip rsync ruby tar openssl-devel readline-devel zlib-devel bzip2).each do |pkg|
62+
%w(unzip rsync ruby tar openssl-devel readline-devel zlib-devel bzip2 initscripts).each do |pkg|
6363
package pkg
6464
end
6565
manual_installer
6666
service 'codedeploy-agent' do
67-
action [:start]
68-
provider Chef::Provider::Service::Init
67+
action [:enable,:start]
68+
Chef::Provider::Service::Upstart
6969
end
7070

7171
when 'debian'
@@ -77,18 +77,25 @@
7777
package pkg
7878
end
7979
download_installer
80+
service 'codedeploy-agent' do
81+
action [:enable,:start]
82+
end
8083

8184
when 'amazon'
8285
%w(ruby aws-cli).each do |pkg|
8386
package pkg
8487
end
8588
amazon_installer
89+
service 'codedeploy-agent' do
90+
action [:start]
91+
provider Chef::Provider::Service::Init
92+
end
8693
else
8794
%w(unzip rsync ruby tar openssl-devel readline-devel zlib-devel).each do |pkg|
8895
package pkg
8996
end
9097
manual_installer
9198
service 'codedeploy-agent' do
92-
action [:start]
99+
action [:enable,:start]
93100
end
94101
end

test/integration/aws-codedeploy-agent/serverspec/default_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set :backend, :exec
44

55
describe service('codedeploy-agent') do
6-
it { should be_running }
6+
it { should be_enabled }
77
end
88

99
describe command('ps -ax | grep "codedeploy-agent: InstanceAgent"') do

0 commit comments

Comments
 (0)