container_ship is yet another ECS deployment tool.
- Using raw
task_definition.jsonfile instead of a template file with complex state or variables
- Convention over configuration
You need to put
Dockerfile in your app root directory.
And all the services/tasks will use the image built with that.
Prepare task_definition.json and Dockerfile
container_ship init YOUR_CLUSTER_NAME
will create empty directory for you. And you must put
task_definition.json file in directories like below.
your_app |-- .container_ship | |-- your_cluster_name | | |-- services // ECS services | | | |-- your_service_name // like server or api | | | | |-- your_envrionment_name // like production or staging | | | | | |-- task_definition.json | | | | | | | | | +-- your_other_environment_name | | | | |-- task_definition.json | | | | | | | +-- your_other_service_name | | | | | | | | +-- tasks // ECS tasks | | |-- your_task_name ( like db-migrate or | | | |-- your_envrionment_name // like production or staging | | | | |-- task_definition.json | | | | | | | +-- your_other_environment_name | | | |-- task_definition.json | | +-- your_task_name ( like db-migrate or | | | +-- your_other_cluster_name |--...
Prepare ECS resources
You must obey
convention over configuration concept. So, naming convention is presented below.
- ECS cluster:
- ECS service:
- ECS task:
And export your ECR repository root uri.
Deploy a service
container_ship ship CLUSTER_NAME SERVICE_NAME ENVIRONMENT BUILD_NUMBER
will deploy a service in
Run a task
container_ship exec CLUSTER_NAME TASK_NAME ENVIRONMENT BUILD_NUMBER
will run a task in
Bug reports and pull requests are welcome on GitHub at https://github.com/seibii/container_ship. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the ContainerShip project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.