Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita514b11

Browse files
author
Lukas Goodfellow
authored
CR-4966 - Service Accounts with ECR (#307)
* Update amazon-web-services.mdCR-4966* Update amazon-ec2-container-registry.md* Added AWS Service Accounts for ECR
1 parentebfd6ce commita514b11

File tree

3 files changed

+45
-13
lines changed

3 files changed

+45
-13
lines changed

‎_docs/integrations/amazon-web-services.md‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,9 @@ Codefresh has native support for AWS in the following areas:
1515

1616
##Using Amazon ECR
1717

18-
Amazon Containerregistries are fully compliant with the Docker registry API that Codefresh follows.You can connect GCR like any[other Docker registry]({{site.baseurl}}/docs/docker-registries/external-docker-registries/amazon-ec2-container-registry/).
18+
Amazon ContainerRegistries are fully compliant with the Docker registry API that Codefresh follows.Follow the instruction under[Amazon EC2 Container Registry]({{site.baseurl}}/docs/docker-registries/external-docker-registries/amazon-ec2-container-registry/) to connect.
1919

20-
{%
21-
include image.html
22-
lightbox="true"
23-
file="/images/integrations/docker-registries/add-amazon-ecr-registry.png"
24-
url="/images/integrations/docker-registries/add-amazon-ecr-registry.png"
25-
alt="Connecting to ECR"
26-
caption="Connecting to ECR"
27-
max-width="70%"
28-
%}
29-
30-
Once the registry is added you can the[standard push step]({{site.baseurl}}/docs/codefresh-yaml/steps/push/) step in pipelines. See also the documentation page for[working with Docker registries]({{site.baseurl}}/docs/docker-registries/working-with-docker-registries/).
20+
Once the registry is added, you can use the[standard push step]({{site.baseurl}}/docs/codefresh-yaml/steps/push/) in your pipelines. See[working with Docker registries]({{site.baseurl}}/docs/docker-registries/working-with-docker-registries/) for more information.
3121

3222
##Deploying to Amazon Kubernetes
3323

‎_docs/integrations/docker-registries/amazon-ec2-container-registry.md‎

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ redirect_from:
99
toc:true
1010
---
1111

12+
##Setting Up ECR Integration - IAM User
13+
1214
Go to your Account Configuration, by clicking on*Account Settings* on the left sidebar. On the first section called*Integrations* click the*Configure* button next to*Docker Registry*.
1315

1416
To configure ECR first select**Amazon ECR** from the new registry drop down
@@ -42,6 +44,43 @@ More information and examples can be found [here](http://docs.aws.amazon.com/Ama
4244
1. For resource-based users require permissions to call ecr:GetAuthorizationToken before they can authenticate to a registry and push or pull any images from any Amazon ECR repository, than you need provide push/pull permissions to specific registry. More information and examples can be found[here](http://docs.aws.amazon.com/AmazonECR/latest/userguide/RepositoryPolicies.html){:target="_blank"}.
4345
{{site.data.callout.end}}
4446

47+
##Setting Up ECR Integration - Service Account
48+
49+
Go to your Account Configuration by clicking on*Account Settings* on the left sidebar. On the first section called*Integrations* click the*Configure* button next to*Docker Registry*.
50+
51+
To configure ECR, first select**Amazon ECR** from the new registry drop down
52+
and then provided the following:
53+
54+
* Registry Name - unique name for this configuration.
55+
* Region - AWS region.
56+
* Check the Box*Resolve credentials from service account*
57+
58+
{{site.data.callout.callout_info}}
59+
#####Note
60+
61+
This option is for hybrid customers who use the Codefresh Runner on their accounts. You will also need to make sure you have set up a Kubernetes service account to use an IAM role. You can follow the[AWS Documentation](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html)
62+
{{site.data.callout.end}}
63+
64+
There are four different levels to define the service account; Runtime, Account, Pipeline, Trigger.
65+
66+
The Runtime level is the lowest in the priority. You can define it in the Runtime Specification under runtimeScheduler > Cluster (same level as namespace) and specify the service account. The key for this will be`serviceAccount`. You can use the default and make sure you have the correct annotation added to the Service Account. Another option is to create a new service account with the proper permissions and annotations.
67+
68+
```yaml
69+
runtimeScheduler:
70+
cluster:
71+
namespace:codefresh
72+
clusterProvider:
73+
accountId:5c1658d1736122ee1114c842
74+
selector:docker-desktop
75+
serviceAccount:codefresh-engine
76+
```
77+
78+
The Account level is the next priority. To define the service account, you will go to Account Settings > Pipeline Settings > Advanced Options. Here there will be an option called *Authenticate to ECR using this service account*. Here you will type in the Kubernetes service account.
79+
80+
Following the Account level is the Pipeline level. You will go to the pipeline you want > Settings > Runtime, then define the Service Account.
81+
82+
The last and highest priority is the Trigger. You will go to the pipeline you want > Workflow > Triggers (modify or add) > Advanced Options, and you can define the Service Account.
83+
4584
## Pushing Docker images to Amazon ECR
4685
4786
There are 2 ways to push images
@@ -104,4 +143,4 @@ max-width="40%"
104143

105144
* [Working with Docker Registries]({{site.baseurl}}/docs/ci-cd-guides/working-with-docker-registries/)
106145
* [Push step]({{site.baseurl}}/docs/codefresh-yaml/steps/push/)
107-
*[Building and pushing an image]({{site.baseurl}}/docs/yaml-examples/examples/build-and-push-an-image/)
146+
* [Building and pushing an image]({{site.baseurl}}/docs/yaml-examples/examples/build-and-push-an-image/)

‎_docs/whats-new/whats-new.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ toc: true
1010

1111
##Recent Codefresh Updates:
1212

13+
##August 2021
14+
- Using AWS Service Account for ECR Integration -[documentation]({{site.baseurl}}/docs/integrations/docker-registries/amazon-ec2-container-registry/#setting-up-ecr-integration---service-account)
15+
1316
##July 2021
1417
- New platform IP addresses -[documentation]({{site.baseurl}}/docs/administration/platform-ip-addresses/)
1518

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp