-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from skyu-io/feat/hw/ec2-cron-docs
Feature :: Initial Docker Compose Job on EC2 Tutorial
- Loading branch information
Showing
13 changed files
with
66 additions
and
1 deletion.
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,65 @@ | ||
--- | ||
title: Docker Compose Jobs on EC2 | ||
--- | ||
|
||
# Getting Started | ||
|
||
This application type will generate pipelines that Spin up `EC2 Spot instances`, running `docker-compose` jobs inside them. The instance will shutdown automatically if the job succeded or not. | ||
|
||
You can schedule this as a cron job. The artefacts created from the job can be viewed from the SkyU console once they are available. | ||
|
||
## 01 - Create Application | ||
|
||
Create an Application with the type `Docker Compose Jobs on EC2` | ||
|
||
 | ||
|
||
## 02 - Linking Appplication Repo | ||
|
||
Link your Application repo. | ||
|
||
 | ||
|
||
## 03 - Removing Default Triggers | ||
|
||
Remove the default triggers from `Pipeline Triggers` step. Leave the all optional fields empty since you can add cron schedules from the next step. | ||
|
||
 | ||
|
||
## 04 - Configuring the build Pipeline | ||
|
||
Next, configure the Build Pipeline. Start by creating a new Cloud Credential for the Application. `ARN to be accessed by` needs to be `EC2 Docker Compose` | ||
|
||
 | ||
|
||
Then Select the `Region`. `Instance Types`, `Spot Instance Bid Price` and `VPCs` will be made available bsaed on the `Region` | ||
|
||
 | ||
|
||
Once the `VPC` is selected. `Subnet ID` and `Security Group` will be made available. | ||
|
||
 | ||
|
||
> `Subnet ID` needs to be a public ID and make sure `Enble auto-assign public IPv4 address` under subnet settings is ticked for the selected subnet. | ||
 | ||
|
||
Then create a new Git Credential or select an existing one to add as the `Personal Access Token`. This should be a PAT with access to the repo and repo actions. | ||
|
||
 | ||
|
||
> This PAT would also need to be a `non-expiring` token. All credentials saved via SkyU are safely stored using secret managers. This token will be used to register the created spot instance when ever the schedule cron is triggered. This step will fail if the token is expired at a given time. Hence a non-expiring token. | ||
Then select the `docker-compose` file. Add optional additional `compose commands` as needed. Afterwards, provide an artefact path for the `S3 source path`. This is needed if you want to sync any outputs from the cron docker compose job. These artefacts can then be viewed via SkyU console. | ||
|
||
 | ||
|
||
`S3 Sync Folder` and `Trigger Path` can be left as empty. Make sure to add the cron schedule under `Schedules` in Advanced Settings. | ||
 | ||
|
||
>! Make sure to type and hit enter in `Additional Compose Commands` and `Schedules`. | ||
Finally create the Application | ||
|
||
## 05 - Check CI logs for the compose job status. | ||
 |
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
Binary file added
BIN
+59.8 KB
.../images/tutorials/app-creation/docker-compose-job-on-ec2/build-pipeline-pt1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+61.7 KB
.../images/tutorials/app-creation/docker-compose-job-on-ec2/build-pipeline-pt2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.8 KB
.../images/tutorials/app-creation/docker-compose-job-on-ec2/build-pipeline-pt3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+72.7 KB
.../images/tutorials/app-creation/docker-compose-job-on-ec2/build-pipeline-pt4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+67.2 KB
.../images/tutorials/app-creation/docker-compose-job-on-ec2/build-pipeline-pt5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+93.7 KB
.../images/tutorials/app-creation/docker-compose-job-on-ec2/build-pipeline-pt6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.81 KB
.../images/tutorials/app-creation/docker-compose-job-on-ec2/build-pipeline-pt7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+113 KB
...es/tutorials/app-creation/docker-compose-job-on-ec2/create-cloud-credential.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+64.5 KB
...utorials/app-creation/docker-compose-job-on-ec2/remove-application-triggers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.5 KB
...es/tutorials/app-creation/docker-compose-job-on-ec2/select-application-repo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+128 KB
.../images/tutorials/app-creation/docker-compose-job-on-ec2/select-application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.