From a DevOps process standpoint, it is a good practice to keep changes to an application under version control. Which of the following allows changes to a Docker image to be stored in a version control system?
Correct Answer: B
The option that allows changes to a Docker image to be stored in a version control system is: docker commit The docker commit command is used to create a new image from a container ' s changes. It takes a running container as input, captures the changes made to it, and creates a new image with those changes. This new image can then be tagged and pushed to a registry, or saved locally. By using docker commit, you can effectively capture the changes made to a container as a new image and store it in a version control system along with the Dockerfile and other project files. This allows for reproducibility and traceability of changes to the Docker image over time.
Question 7
What is the difference between blue/green and canary deployment strategies? (Choose the best answer.)
Correct Answer: B
The correct answer is: In blue/green deployment, both old and new applications are in production at the same time. In canary deployment, the application is deployed incrementally to a select group of people. In a blue /green deployment strategy, two identical environments, referred to as blue and green, are set up. The current production environment (blue) continues to serve live traffic while a new version of the application is deployed in the green environment. Once the new version is tested and deemed stable, traffic is routed from the blue environment to the green environment, making it the new production environment. This approach allows for a seamless switch between the old and new versions of the application. On the other hand, in a canary deployment strategy, the new version of the application is deployed incrementally to a small subset of users or a specific group. This allows for testing the new version in a real production environment while minimizing the impact of any potential issues. If the new version performs well and meets the desired criteria, it can be gradually rolled out to a larger audience or the entire user base. In summary, the main difference between blue/green and canary deployment strategies lies in how the deployment is managed. Blue/green involves simultaneous production of both old and new applications, while canary deployment focuses on incremental deployment to a select group of users.
Question 8
To enforce mutual TLS (mTLS) authentication for clients of your microservices, your team has chosen to leverage the Oracle Cloud Infrastructure (OCI) API Gateway service to create new API Deployments that will direct requests to your microservices. Which is NOT valid regarding the mTLS options in OCI API Gateway?
Correct Answer: B
The correct answer is: " Adding a custom certificate authority (CA) or custom CA bundle to your gateway ' s trust store for mTLS is optional unless you need to reject certificates that do not contain particular values (such as a domain name). " The statement that is NOT valid regarding the mTLS options in OCI API Gateway is: " Adding a custom certificate authority (CA) or custom CA bundle to your gateway ' s trust store for mTLS is optional unless you need to reject certificates that do not contain particular values (such as a domain name). " In OCI API Gateway, adding a custom certificate authority (CA) or custom CA bundle to the gateway ' s trust store is not optional. It is a necessary step when configuring mTLS authentication. The trust store in the gateway is used to validate the client certificates presented during mTLS authentication. The other options listed are valid regarding the mTLS options in OCI API Gateway: Once the mTLS request policy is enabled, all requests with valid certificates are routed to the backend unless specific values (such as a domain name) are defined. This means that only requests with valid client certificates will be allowed to access the backend microservices. The mTLS request policy can only be enabled at the API deployment specification level, and it applies globally to all routes in that deployment. This ensures consistent mTLS authentication across all routes and endpoints in the API deployment. Custom CA or custom CA bundles can be added to the gateway ' s trust store, but only if they already exist in the OCI Certificates service. This allows you to include trusted CAs or CA bundles to validate client certificates during mTLS authentication.
Question 9
You have just finished building and compiling the software required to implement the API microservice component. You need to rebuild the API docker image, and plan to tag it as: ocIdevops/api:latest Which docker command would re-create the API docker image?
Correct Answer: A
The correct command to rebuild the API docker image and tag it as OCIdevops/api:latest is: docker build -t OCIdevops/api:latest The docker build command is used to build a Docker image from a Dockerfile. The -t flag is used to specify the name and optionally a tag for the image. In this case, the name of the image is OCIdevops/api and the tag is latest. By running this command, the Docker image will be recreated based on the instructions in the Dockerfile and tagged with the specified name and tag.
Question 10
You plan to implement logging in your services that will run in Oracle Cloud Infrastructure (OCI) Container Engine for Kubernetes (OKE). Which statement describes the appropriate logging approach?
Correct Answer: A
The appropriate logging approach for services running in Oracle Cloud Infrastructure (OCI) Container Engine for Kubernetes (OKE) is: " All services log to standard output only. " When running services in a containerized environment like OKE, it is recommended to follow the Twelve-Factor App methodology, which suggests treating logs as event streams. According to this methodology, services should write their log events to standard output (stdout) instead of writing to log files. By logging to standard output, the container runtime (such as Kubernetes) can collect and aggregate the logs generated by the services. These logs can then be accessed and managed through the container runtime ' s logging infrastructure. Logging to standard output offers several advantages in a containerized environment: Simplicity and consistency: Standardizing on logging to stdout ensures a consistent approach across different services, making it easier to manage and analyze logs. Log aggregation: The container runtime can collect the logs from all the running containers and provide centralized log management, allowing you to access and search logs from different services in one place. Scalability: Since logs are written to stdout, they can be easily handled by the container runtime ' s log management system, which can scale to handle large volumes of log data. Separation of concerns: By logging to stdout, the responsibility of managing log files and their rotation is shifted to the container runtime, allowing the services to focus on their core functionality. While it is possible to log to log files or external logging systems, the recommended approach in a containerized environment like OKE is to log to standard output and leverage the logging infrastructure provided by the container runtime.