Attach Image
This document serves as a detailed guide on managing and deploying container images using Facets.
How to Attach an Image to a Service Resource?
- Open the Projects tab and select the required project.
- In the Blueprint tab, select the required service resource and choose Overview from the dropdown.
- Select the Images tab.
- Click on the edit icon beside the Current Strategy.
- Facets offers three CI/CD strategies:
- Set a default static image across all environments.
- Manually attach images for this service in all environments.
- Use the CI/CD workflow set at the project level.
Set a Default Static Image Across All Environments
- Select Set a default static image across all environments.
- Specify the Default Image URL. This image will be deployed for all environments in this project.
- Click Save Changes.
You have successfully attached the image to all the environments.
Manually Attach Images for this Service in All Environments
- Select Manually Attach Images for This Service in All Environments and click Save Changes.
- In the Images tab, you will find all the environments displayed as cards.
- Click on Attach Image in an environment card.
- The Attach Image modal appears.
- Here, you can choose to Select Image or Specify URL.
- If you choose to select an image, select the Container Registry, Repository, and Tag.
- If you choose to specify the URL, select the Container Registry and mention the Image URL.
- Click Attach.
You have successfully attached the image to that environment. Repeat this process for all the remaining environments.
Use the CI/CD Workflow Set at the Project Level
This option allows you to use the CI/CD workflow set at the project level. Based on the workflow set in the CI/CD, you will be able to attach images to the environment.
- Select Use the CI/CD Workflow Set at the Project Level.
- Click Save Changes.
This will display the CI/CD set at the projects level in the images tab. - To attach an image, click on the Attach Image button.
- The Attach Image modal appears.
- Here, you can choose to Select Image or Specify URL.
- If you choose to select an image, select the Container Registry, Repository, and Tag.
- If you choose to specify the URL, select the Container Registry and mention the Image URL.
- Click Attach.
You have successfully attached the image.
How to Register and Push images using CLI?
Facets allows you to register and push images to the container registries using FacetsCTL.
- Open the Projects tab and select the required project.
- In the Blueprint tab, select the required service resource and choose Overview from the dropdown.
- Select the Images tab.
- Under Use CLI, select the desired Container Registry where the updated image must be registered or pushed.
- If not already installed, execute the command in Step: 1 to Install FacetsCTL.
- Execute the command in Step: 2 to Integrate the Image. Update the values such as
DOCKER_IMAGE_URL
andTOKEN
. - Toggle off Push Image to only register the image, or leave it on to register and push the image to the container registry.
FAQ
1. Why do I need to add my container image to a container registry?
Adding your image to a container registry is essential because it allows the image to be stored in a central, accessible location. This ensures that the image can be pulled and used during the deployment of your application.
2. What happens if I turn off the "Push Image" toggle?
If you turn off the "Push Image" toggle, the image will only be registered in the container registry but not pushed. This means the image data won't be uploaded, and the deployment process will not be able to pull the image, causing your deployment to fail.
3. Can I deploy my application if I only register the image and do not push it?
No, you cannot deploy your application if the image is only registered but not pushed.
Related Guides
Updated 5 months ago