Add a mechanism to transfer Docker images contained inside a K8s cloud server template over to ECR. Once transfered, update the container image url to the ECR version and copy it up to S3.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

baldwinlouie created an issue. See original summary.

baldwinlouie’s picture

Status: Active » Needs review
FileSize
57.21 KB
340 bytes

Added this functionality. The specifics are:

1. Added a Docker module that contains a service to talk with Docker. Note, Docker has to be installed on the same server as Cloud Orchestrator. There is a Docker admin/config/services/cloud/docker/settings page to specify the Docker socket.
2. Add an EcrService to talk with AWS ECR
3. Added code to cron to parse cloud server template yaml file, extract the container image urls, download the images, tag them for ECR, and finally push them up to ECR.
4. The steps in #3 can be fairly intensive. I ended up using batch to run through all the operations.
5. There is a new fieldset in K8sToS3AdminSettings so you can turn on this functionality and specify which AWS region to use for ECR
6. Slightly refactored the code in k8s_to_s3.module since this functionality shares the S3 copying code.

yas’s picture

@baldwinlouie

Could you please review the patch?

@baldwinlouie

Thank you for adding the great feature. It looks good to me.

screenshot-20191029a.png
screenshot-20191029b.png
screenshot-20191029c.png
screenshot-20191029d.png
screenshot-20191029e.png
screenshot-20191029f.png

@xiaohua-guan

Could you please review the patch?

Xiaohua Guan’s picture

@all

Thanks for the great patch! The patch looks OK to me.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@xiaohua-guan

Thank you for your review. I'll merge the patch to 8.x-2.x and close this issue as Fixed.

  • yas committed 67b46ba on 8.x-2.x authored by baldwinlouie
    Issue #3090650 by baldwinlouie, yas, Xiaohua Guan: Copy K8s template...
yas’s picture

Status: Reviewed & tested by the community » Fixed
yas’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.