Ansible is a free and open source configuration management system that allows you to automatically deploy and centrally manage your applications. You can easily manage and control large numbers of servers from central location using Ansible. Ansible is a great alternative solution of Chef and Puppet because it has a much smaller overhead to get started. Ansible uses SSH channels to retrieve information from remote system, so you does not require any additional software to be installed on the client computers.
The biggest challenge for any IT administrator or DevOps engineer is to prepare environments the agile way by making sure that all the environments carry same components all the time.
In some cases, environments are geographically distributed and changes should be rolled out in such a way that it does not impact existing infrastructure and delivered in time to meet the SLO (Service Level Objectives), SLI (Service Level Indicators), and SLA (Service Level Agreements).
This blog post will help you to understand how to configure and manage the infrastructure with identical software/components on each system. The blog post is intended for the readers with some or intermediate IT administration experience.
The blog post will answer the following questions
As defined in Wikipedia, "Configuration Management is establishing and maintaining consistency of a product's performance, functional, and physical attributes with its requirements, design, and operational information throughout its life".
From a DevOps perspective, we need to make sure that the development environment is exactly similar to the production and UAT - User Acceptance Test servers. This will help to reduce to see the different results from the environment to the environment.
The first step to getting started with is to create an inventory of all the requirements. The following is a sample inventory baseline file.
Now as we have the requirement, the next step is to automate it and we will use Ansible. Ansible is an open source IT automation tool that can improve the stability, reliability, and consistency of the IT infrastructure.
This tutorial will walk you through the step by step instruction of how to install and use Ansible on an Alibaba Cloud ECS Ubuntu 16.04 server.
First, Login to your Alibaba Cloud ECS Console. You will be redirected to the main dashboard. You will need to navigate to your ECS instance by selecting the appropriate region. For this tutorial, I have created my ECS instances in the Singapore region.
If you haven't created an instance, you can check out this tutorial or follow the steps on this quick start guide. You will need to have two running ECS instances, preferably on the same region.
Note that I have set up my ECS instances with SSH key pairs as credential. This allows me to connect to the instances using SSH.
By default, Ansible is not available in Ubuntu 16.04 repository. So you will need to add Ansible personal repository to on the server node. You can add the repository using the following command:
In this article, we will learn how to manage users using Ansible in an Alibaba Cloud environment. We will start by defining the architecture, as shown in the diagram below.
The diagram shows an Ansible controller node managing various nodes using SSH protocol. Extending this diagram, we are going to create playbooks that will manage different users with their sudoers privilege in the target node.
To follow this tutorial, you will need to have Alibaba Cloud Elastic Compute Service (ECS) instances. If you are not sure how to launch an ECS instance in Alibaba Cloud, refer to this documentation.
Here is a quick guide of creating and setting up ansible user in controller and target nodes.
Ansible User Setup in Controller Node
Create ansible remote user to manage the installation from Ansible Controller node. This user should have appropriate sudo privileges. An example sudoers entry is given below.
Elastic Compute Service provides Elastic and secure virtual cloud servers to cater all your cloud hosting needs.
Simple Application Server is a single server-based service for application deployment, security management, O&M monitoring, and more
When you want to migrate a large number of servers at a time, it takes an extended period of time if you migrate each server through full data migration. If you have more than 10 servers to migrate, we recommend that you create scripts for batch migration.
Automated O&M tools such as Ansible are typically used to manage a large group of server systems. You can easily complete repetitive operations by using Ansible. For example, you can copy the same file to 100 servers or install and start the Apache service on 100 servers simultaneously.
GitLab CE edition is a free open-source tool that helps you host Git repositories and run your CI/CD pipeline.
To keep it simple, you can install GitLab on an ECS instance with a direct access to Internet. Although the servers will be protected via encryption and restrictive security group rules, you might also want to isolate your virtual machines from Internet by using a VPN Gateway.
What is DevOps? Its a combination of cultural philosophies, practices, and tools that increases a team’s ability to rapidly deliver services. In this clouder course, you’ll learn the concept and history of DevOps, how it works compared with traditional methodology, tools that support DevOps and recap the ideas with some classic case studies.
In this clouder course, you’ll learn how to conduct DevOps practices on Alibaba Cloud by using Alibaba Cloud services like ECS, some open source tools and GitHub.
Perform Accelerated User Experience Testing without Modifying DNS
2,624 posts | 721 followersFollow
Alibaba Clouder - April 2, 2019
Alibaba Clouder - May 29, 2019
JDP - July 31, 2020
Alibaba Clouder - December 17, 2018
Alibaba Clouder - July 12, 2018
Alibaba Clouder - October 30, 2018
2,624 posts | 721 followersFollow
Respond to sudden traffic spikes and minimize response time with Server Load BalancerLearn More
An encrypted and secure cloud storage service which stores, processes and accesses massive amounts of data from anywhere in the worldLearn More
More Posts by Alibaba Clouder