1) ___ is an alternative to a rolling deployment and it ensure that changes which require replacing instances are applied correctly and efficiently.
Immutable environments
Explanation
Immutable is an alternative to a rolling deployment and it ensures that changes which require replacing instances are applied correctly and efficiently. For example, you create a separate environment when using an immutable deployment which adds instances to a different auto-scaling group behind the same load balancer. The new instances and the old instances will serve traffic alongside each other. Once we figure out that the new instances are healthy, then the original auto-scaling group can be terminated or shut down. So, with this, you are using two auto-scaling groups but the same load balancer.
2) What are examples of requirements to consider when selecting a deployment method?
Downtime, Cost , Re-usability
Explanation
Deployments are not just about deploying application and code, it’s also deploying changes to the architecture that you are using. You need to think about requirements: Can there be downtime if there is a failed deployment? Is it alright if our deployments take longer and require more resources which means they cost more, but maybe they reduce the chances of having downtime? Can we re-use instances or do we want to destroy those and start with brand new ones?
3) Which of the following is the main problem with “All at Once” deployment?
If deployment fails, you will have downtime
Explanation
One main problem with this approach is that if the deployment fails, the application will be unavailable and you will have downtime. For you to roll back, you must revert and re-deploy to all of the instances.
4) With this deployment method, we create two identical stacks of the application, running in separate environments.
Blue/Green
Explanation
In Blue/Green deployment, you might have two elastic load balancers, two auto-scaling groups, and each of those would run the independent instances that have separate versions of our application. Other than that, they are identical. We do this to test the application in the same environment but isolated from production, until we have thoroughly checked the new application version and we are ready to switch over to production.
5) True or False: DevOps is a process or methodology around deploying and managing environments.
True
Explanation
DevOps isn’t a piece of software. Instead, it’s a process and a combination of concepts around that process. That combination increases our ability to deliver applications or services faster than before.
6) True or False: In-place deployment method is used for configuration management such as Chef, Puppet, Salt, or Ansible.
True
Explanation
In-place involves performing application updates on an instance, while disposable involves rolling out new instances and terminating older ones. For example, when thinking about in-place deployments, think about configuration management such as Chef, Puppet, Salt, or Ansible. Now, in an in-place upgrade environment where we want to maintain configuration over the lifetime of the instance, we might use something like OpsWorks. Instead, disposable upgrades involve rolling out new instances and terminating the old ones. Making changes and creating a new AMI from those changes to deploy new instances, for example. Essentially rolling out those changes using an immutable or blue/green deployment, and then destroying the old deployments.
7) How many questions are on the AWS DevOps Exam?
80
Explanation
The DevOps Engineer exam is three hours long with 80 scenario-based questions which are much more advanced than the associate-level exams.
8) Which method would you use when making changes and creating a new AMI from those changes to deploy new instances. In other words, essentially rolling out those changes using an immutable or blue/green deployment and then destroying the old deployments.
Disposable
Explanation
Disposable upgrades involve rolling out new instances and terminating the old ones.
9) Select all deployment methods that never require a DNS change:
“All at Once”, Rolling, Immutable environments
Explanation
All the above do not require a DNS change except for Blue/Green. The key word is never. In Blue/Green we need to change DNS settings to point to the new environment, especially if you are using Elastic Beanstalk which currently uses DNS changes. But this is not necessary all the time. If we’re not using Elastic Beanstalk, we can reuse the ELB and only switch over the load balancer to your new auto scaling deployment once it is tested. The reason we usually want to avoid DNS changes is because they can be messy. There are multiple levels of DNS clients, and they don’t always obey time to live rules, which can cause weird issues and send users to the wrong application.
10) Which deployment method rolls out changes to a specific number or percentage of instances at a time?
Rolling
Explanation
Rolling deployment rolls out changes to a specific number or percentage of instances at a time. For example, 20% of instances will get the new code while 80% will still run the previous application version. This approach does require a little bit more time to deploy changes, since we are not doing it all at the same time. However, this can provide zero downtime because if we notice an issue with the newly deployed code, we still have functioning instances with functioning code and we can simply roll back the 20% of instances affected by the changes. We can have the load balancer stop serving traffic to those instances as well so that no one gets sent to them and gets affected by downtime.
