Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit f325ac9

Browse files
authored
Merge pull request #1 from monade/cloud-formation
Implementing command #setup to create the cluster / services directly from CLI
2 parents ef8a15a + cbbdc35 commit f325ac9

File tree

20 files changed

+888
-11
lines changed

20 files changed

+888
-11
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ language: ruby
33
rvm:
44
- 2.5.7
55
- 2.6.6
6-
- 2.7.1
7-
- 3.0.0
6+
- 2.7.2
7+
- 3.0.1
88

99
before_install:
1010
- yes | gem update --system --force

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22
All notable changes to this project made by Monade Team are documented in this file. For info refer to team@monade.io
33

4+
## [0.3.0] - 2021-05-19
5+
### Added
6+
- new command `setup` that creates the cluster and all the services
7+
- If you select "cloudwatch" as log target for your container, the log groups get automatically created
8+
- Allow setting up load balancers for services
9+
410
## [0.2.2] - 2021-04-01
511
### Fixed
612
- Command `diff` was showing a bunch of junk data

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ Check if your ECSFile is valid
145145
$ ecs-deploy validate
146146
```
147147

148+
Create the cluster and the services
149+
```bash
150+
$ ecs-deploy setup
151+
```
152+
148153
Deploy all services and scheduled tasks
149154
```bash
150155
$ ecs-deploy deploy
@@ -187,11 +192,12 @@ runner = EcsDeployCli::Runner.new(parser)
187192
runner.update_services!
188193
```
189194

195+
### Known issues
196+
- The ecsInstanceRole has to be created manually if missing: https://docs.aws.amazon.com/batch/latest/userguide/instance_IAM_role.html
197+
190198
## TODOs
191199

192-
- Create cloudwatch logs group if it doesn't exist yet
193-
- Create the service if not present?
194200
- Create scheduled tasks if not present?
195-
- Navigate through logs
201+
- Navigate through logs (or maybe not: https://github.com/jorgebastida/awslogs)
196202
- Recap cluster status
197203
- More configuration options

ecs-deploy-cli.gemspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ Gem::Specification.new do |s|
1919
s.license = 'MIT'
2020
s.executables << 'ecs-deploy'
2121
s.add_dependency 'activesupport', ['>= 5', '< 7']
22+
s.add_dependency 'aws-sdk-cloudformation', '~> 1'
2223
s.add_dependency 'aws-sdk-cloudwatchevents', '~> 1'
24+
s.add_dependency 'aws-sdk-cloudwatchlogs', '~> 1'
2325
s.add_dependency 'aws-sdk-ec2', '~> 1'
2426
s.add_dependency 'aws-sdk-ecs', '~> 1'
27+
s.add_dependency 'aws-sdk-ssm', '~> 1'
2528
s.add_dependency 'colorize', '~> 0.8.1'
2629
s.add_dependency 'hashdiff', '~> 1.0'
2730
s.add_dependency 'thor', '~> 1.1'

lib/ecs_deploy_cli.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def self.logger=(value)
2626

2727
require 'ecs_deploy_cli/version'
2828
require 'ecs_deploy_cli/dsl/auto_options'
29+
require 'ecs_deploy_cli/dsl/cluster'
2930
require 'ecs_deploy_cli/dsl/container'
3031
require 'ecs_deploy_cli/dsl/task'
3132
require 'ecs_deploy_cli/dsl/cron'

lib/ecs_deploy_cli/cli.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ def version
2626
puts "ECS Deploy CLI Version #{EcsDeployCli::VERSION}."
2727
end
2828

29+
desc 'setup', 'Creates the cluster and relative services'
30+
option :file, default: 'ECSFile'
31+
def setup
32+
@parser = load(options[:file])
33+
runner.setup!
34+
end
35+
2936
desc 'deploy-scheduled-tasks', 'Updates all scheduled tasks defined in your ECSFile'
3037
option :file, default: 'ECSFile'
3138
def deploy_scheduled_tasks

0 commit comments

Comments
 (0)