generated from AgnostiqHQ/covalent-executor-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add cicd pipeline * updates * Update the changelog * merge with develop * update executor * Add tests and logging statements * fix a test * Add a validation layer to the ECS instantiation step * Change some of the variable names * fix config key * Fix tests * minor typo * Update changelog date * Update changelog * Update readme and add banner * ensure that fargate policy link works * Update broken readme ling * Update broken readme link * Remove some of the Fargate references * update readme - remove my personal file name from config * Fix breaking change * Update readme * Update the policy to remove the specific aws account info * Clean up IAM policy
- Loading branch information
Showing
7 changed files
with
46 additions
and
178 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
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 |
---|---|---|
|
@@ -2,75 +2,75 @@ | |
|
||
<div align="center"> | ||
|
||
 | ||
 | ||
|
||
| ||
<img src="https://github.com/AgnostiqHQ/covalent-ecs-plugin/blob/main/doc/source/_static/aws_ecs_readme_banner.jpg" width=150%> | ||
|
||
</div> | ||
|
||
## Covalent Fargate Plugin | ||
## Covalent ECS Plugin | ||
|
||
Covalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. This executor plugin interfaces Covalent with AWS Fargate via the [Elastic Container Service](https://docs.aws.amazon.com/ecs/index.html). In order for workflows to be deployable, users must have AWS credentials attached to the [CovalentFargateExecutorPolicy](https://github.com/AgnostiqHQ/covalent-fargate-executor/infra/iam/CovalentFargateExecutorPolicy.json). Users will need additional permissions to provision or manage cloud infrastructure used by this plugin. | ||
Covalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. This executor plugin interfaces Covalent with AWS [Elastic Container Service](https://docs.aws.amazon.com/ecs/index.html) where the tasks are run using Fargate. In order for workflows to be deployable, users must have AWS credentials attached to the [CovalentECSExecutorPolicy](https://github.com/AgnostiqHQ/covalent-ecs-plugin/blob/main/infra/iam/CovalentECSExecutorPolicy.json). Users will need additional permissions to provision or manage cloud infrastructure used by this plugin. | ||
|
||
To use this plugin with Covalent, clone this repository and install it using `pip`: | ||
|
||
``` | ||
git clone [email protected]:AgnostiqHQ/covalent-fargate-plugin.git | ||
cd covalent-fargate-plugin | ||
git clone [email protected]:AgnostiqHQ/covalent-ecs-plugin.git | ||
cd covalent-ecs-plugin | ||
pip install . | ||
``` | ||
|
||
Users must add the correct entries to their Covalent [configuration](https://covalent.readthedocs.io/en/latest/how_to/config/customization.html) to support the Fargate plugin. Below is an example which works using some basic infrastructure created for testing purposes: | ||
Users must add the correct entries to their Covalent [configuration](https://covalent.readthedocs.io/en/latest/how_to/config/customization.html) to support the ECS plugin. Below is an example which works using some basic infrastructure created for testing purposes: | ||
|
||
```console | ||
[executors.fargate] | ||
[executors.ecs] | ||
credentials = "/home/user/.aws/credentials" | ||
profile = "" | ||
profile = "default" | ||
s3_bucket_name = "covalent-fargate-task-resources" | ||
ecr_repo_name = "covalent-fargate-task-images" | ||
ecs_cluster_name = "covalent-fargate-cluster" | ||
ecs_task_family_name = "covalent-fargate-tasks" | ||
ecs_task_execution_role_name = "ecsTaskExecutionRole" | ||
ecs_task_role_name = "CovalentFargateTaskRole" | ||
ecs_task_subnet_id = "subnet-871545e1" | ||
ecs_task_security_group_id = "sg-0043541a" | ||
ecs_task_log_group_name = "covalent-fargate-task-logs" | ||
vcpu = 0.25 | ||
memory = 0.5 | ||
cache_dir = "/tmp/covalent" | ||
ecs_task_subnets = "subnet-994c4697,subnet-861e43d9,subnet-779cc356,subnet-326a0e03,subnet-871545e1,subnet-6793732b" | ||
ecs_task_vpc = "vpc-b2bdd0cf" | ||
ecs_task_security_groups = "sg-0043541a" | ||
poll_freq = 10 | ||
ecs_task_execution_role_name = "ecsTaskExecutionRole" | ||
ecs_task_log_group_name = "covalent-fargate-task-logs" | ||
``` | ||
|
||
Within a workflow, users can then decorate electrons using these default settings: | ||
|
||
```python | ||
import covalent as ct | ||
|
||
@ct.electron(executor="fargate") | ||
@ct.electron(executor="ecs") | ||
def my_task(x, y): | ||
return x + y | ||
``` | ||
|
||
or use a class object to customize the resources and other behavior: | ||
|
||
```python | ||
executor = ct.executor.FargateExecutor( | ||
executor = ct.executor.ECSExecutor( | ||
vcpu=1, | ||
memory=2 | ||
memory=2, | ||
ecs_task_subnet_id="subnet-871545e1", | ||
ecs_task_security_group_id="sg-0043541a" | ||
) | ||
|
||
@ct.electron(executor=executor) | ||
def my_custom_task(x, y): | ||
return x + y | ||
``` | ||
|
||
Ensure that Docker is running on the client side machine before deploying the workflow. | ||
|
||
For more information about how to get started with Covalent, check out the project [homepage](https://github.com/AgnostiqHQ/covalent) and the official [documentation](https://covalent.readthedocs.io/en/latest/). | ||
|
||
## Release Notes | ||
|
||
Release notes are available in the [Changelog](https://github.com/AgnostiqHQ/covalent-fargate-executor/blob/main/CHANGELOG.md). | ||
Release notes are available in the [Changelog](https://github.com/AgnostiqHQ/covalent-ecs-executor/blob/main/CHANGELOG.md). | ||
|
||
## Citation | ||
|
||
|
@@ -81,4 +81,4 @@ Please use the following citation in any publications: | |
## License | ||
|
||
Covalent is licensed under the GNU Affero GPL 3.0 License. Covalent may be distributed under other licenses upon request. See the [LICENSE](https://github.com/AgnostiqHQ/covalent-fargate-executor/blob/main/LICENSE) file or contact the [support team](mailto:[email protected]) for more details. | ||
Covalent is licensed under the GNU Affero GPL 3.0 License. Covalent may be distributed under other licenses upon request. See the [LICENSE](https://github.com/AgnostiqHQ/covalent-ecs-executor/blob/main/LICENSE) file or contact the [support team](mailto:[email protected]) for more details. |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.