One place for hosting & domains

      Management

      How to Deploy Percona Monitoring and Management (PMM) with One-Click Apps


      Updated by Linode

      Contributed by
      Linode

      Marquee image for How to Deploy Percona Monitoring and Management (PMM) with One-Click Apps

      Percona (PMM) One-Click App

      Percona Monitoring and Management (PMM) is an open-source tool which provides a GUI powered by Grafana for monitoring and managing MySQL, MariaDB, PostgreSQL, and MongoDB databases. You can use PMM to easily observe important metrics, logging, and statistics related to your databases and the hosts they run on. Additionally, it includes a number of tools which can help to optimize your database’s performance, manage all database instances, and track and identify potential security threats. Linode’s Percona (PMM) One-Click App deploys a Linode with PMM installed and ready for you to begin monitoring your databases.

      PMM Architecture Overview

      The PMM tool uses a client-server model which makes it easy to scale monitoring across several databases hosted on various remote hosts. See the table below to better understand how each PMM component fits into the context of Linode’s Percona (PMM) One-Click App.

      ComponentDescription
      PMM ServerThe Percona (PMM) One-Click App deploys an instance of the PMM Server, which includes the Grafana web interface to visualize all the data collected from the databases it monitors.
      PMM ClientYou will need to install the PMM Client on any Linode that hosts a database that you would like to monitor. The PMM Client will help you connect to the PMM Server and relay host and database performance metrics to the PMM Server.

      Note

      Deploy a Percona (PMM) One-Click App

      Linode’s One-Click App Marketplace allow you to easily deploy software on a Linode using the Linode Cloud Manager. To access Linode’s One-Click App Marketplace:

      1. Log in to your Linode Cloud Manager account.

      2. From the Linode dashboard, click on the Marketplace button in the left-hand navigation menu.

      3. The Linode creation page will appear, with the One-Click and Marketplace tabs pre-selected.

      4. Under the Select App section, select the app you would like to deploy:

        Select a One-Click App to deploy

      5. Once you have selected the app, proceed to the app’s Options section and provide values for the required fields.

      Percona (PMM) Options

      ConfigurationDescription
      HostnameThe hostname to assign to your new Linode. Required.

      Linode Options

      The following configuration options are possible for your Linode server:

      ConfigurationDescription
      Select an ImageDebian 10 and Ubuntu 20.04 are currently the only images supported by the Percona (PMM) One-Click App. Required.
      RegionThe region where you would like your Linode to reside. In general, it’s best to choose a location that’s closest to you. For more information on choosing a DC, review the How to Choose a Data Center guide. You can also generate MTR reports for a deeper look at the network routes between you and each of our data centers. Required.
      Linode PlanYour Linode’s hardware resources. Percona recommends roughly 1 GB of storage on your PMM Server for each database node you would like to monitor. For more information on Percona’s system requirements see their official documentation. If you decide that you need more or fewer hardware resources after you deploy your app, you can always resize your Linode to a different plan. Required.
      Linode LabelThe name for your Linode, which must be unique between all of the Linodes on your account. This name will be how you identify your server in the Cloud Manager’s Dashboard. Required.
      Root PasswordThe primary administrative password for your Linode instance. This password must be provided when you log in to your Linode via SSH. It must be at least 6 characters long and contain characters from two of the following categories: lowercase and uppercase case letters, numbers, and punctuation characters. Your root password can be used to perform any action on your server, so make it long, complex, and unique. Required.

      When you’ve provided all required Linode Options, click on the Create button. Your PMM app will complete installation anywhere between 1-5 minutes after your Linode has finished provisioning.

      Software Included

      The Percona (PMM) One-Click App will install the following required software on your Linode:

      SoftwareDescription
      DockerDocker is used to containerize PMM.
      GrafanaGrafana is the visualization tool used by PMM to provides charts, graphs, and alerts for the databases that are being monitored.
      pmm-adminpmm-admin is a command-line tool used to manage PMM Clients.

      Note

      Currently, Linode does not manage software and systems updates for One-Click Apps. It is up to the user to perform routine maintenance on software deployed in this fashion.

      Getting Started after Deployment

      Access your PMM Server’s Grafana Dashboard

      After the PMM Server has finished installing, you will be able to access its Grafana dashboard over http:// and your Linode’s IPv4 address. To find your Linode’s IPv4 address:

      1. Click on the Linodes link in the sidebar. You will see a list of all your Linodes.

      2. Find the Linode you just created when deploying your app and select it.

      3. Navigate to the Networking tab.

      4. Your IPv4 address will be listed under the Address column in the IPv4 table.

      5. Copy and paste the IPv4 address into a browser window. Ensure you are using http://.

      6. You will see the PMM Home Dashboard actively monitoring your server:

        Percona Home Page

      Installing the PMM Client

      To begin monitoring a database node, you will need to install the PMM Client on the Linode that hosts your database and connect the node to the PMM Server.

      Note

      The PMM Server deployed with Linode’s Percona (PMM) One-Click App is compatible with PMM Client version 1.
      1. Connect to your Linode via SSH.

      2. Update your system’s software.

        Debian or Ubuntu:

        sudo apt-get update && apt-get upgrade
        

        CentOS:

        sudo yum update
        
      3. Install the PMM Client (version 1):

        Debian or Ubuntu:

        sudo apt-get install pmm-client
        

        CentOS:

        sudo yum install pmm-client
        
      4. Connect your database node to the PMM Server. Replace 192.0.2.0 with your PMM Server’s IPv4 address.

        Note

        sudo pmm-admin config --server 192.0.2.0
        

        Once complete, you should see a similar output:

          
        OK, PMM server is alive.
        
        PMM Server      | 192.0.2.0
        Client Name     | li222-111
        Client Address  | 192.0.2.1
              
        

      Monitor a Database Instance

      Once your database node and your PMM Server are communicating, the final step is to add your database instance to be monitored by your PMM Server. These steps are completed on your Database node.

      1. Connect to your Linode via SSH.

      2. Add your database instance to be monitored by your PMM Server. This command will add a MySQL database instance to be monitored. You can replace mysql with the database type that your node is hosting (i.e. postgresql or mongodb). See Percona’s Managing PMM Client documentation for details.

        pmm-admin add mysql
        

        Your Percona dashboard should now be monitoring your MySQL service.

        https://www.linode.com/perconafinal.png

        Note

      Next Steps

      The Percona Monitoring Management Tool is very powerful and can be configured to monitor and display various pieces of your database instances. Once you have completed the basic configurations outlined in this guide, you should review Percona’s documentation to learn more about the PMM tool. Here are some suggested topics:

      This guide is published under a CC BY-ND 4.0 license.



      Source link

      An Introduction to Configuration Management with Ansible


      Introduction

      Configuration management is the process of handling changes to a system in a way that assures integrity over time, typically involving tools and processes that facilitate automation and observability. Even though this concept didn’t originate in the IT industry, the term is broadly used to refer to server configuration management.

      In the context of servers, configuration management is also commonly referred to as IT Automation or Server Orchestration. Both terms highlight the practical aspects of configuration management and the ability to control multiple systems from a central server.

      This guide will walk you through the benefits of using a configuration management tool to automate your server infrastructure setup, and how one such tool, Ansible, can help you with that.

      There are a number of configuration management tools available on the market, with varying levels of complexity and diverse architectural styles. Although each of these tools have their own characteristics and work in slightly different ways, they all provide the same function: make sure a system’s state matches the state described by a set of provisioning scripts.

      Many of the benefits of configuration management for servers come from the ability to define your infrastructure as code. This enables you to:

      • Use a version control system to keep track of any changes in your infrastructure
      • Reuse provisioning scripts for multiple server environments, such as development, testing, and production
      • Share provisioning scripts between coworkers to facilitate collaboration in a standardised development environment
      • Streamline the process of replicating servers, which facilitates recovery from critical errors

      Additionally, configuration management tools offer you a way to control one to hundreds of servers from a centralized location, which can dramatically improve efficiency and integrity of your server infrastructure.

      Ansible Overview

      Ansible is a modern configuration management tool that facilitates the task of setting up and maintaining remote servers, with a minimalist design intended to get users up and running quickly.

      Users write Ansible provisioning scripts in YAML, a user-friendly data serialization standard that is not tied to any particular programming language. This enables users to create sophisticated provisioning scripts more intuitively compared to similar tools in the same category.

      Ansible doesn’t require any special software to be installed on the nodes that will be managed with this tool. A control machine is set up with the Ansible software, which then communicates with the nodes via standard SSH.

      As a configuration management tool and automation framework, Ansible encapsulates all of the common features present in other tools of the same category, while still maintaining a strong focus on simplicity and performance:

      Idempotent Behavior

      Ansible keeps track of the state of resources in managed systems in order to avoid repeating tasks that were executed before. If a package was already installed, it won’t try to install it again. The objective is that after each provisioning execution the system reaches (or keeps) the desired state, even if you run it multiple times. This is what characterizes Ansible and other configuration management tools as having an idempotent behavior. When running a playbook, you’ll see the status of each task being executed and whether or not the task performed a change in the system.

      Support to Variables, Conditionals, and Loops

      When writing Ansible automation scripts, you can use variables, conditionals, and loops in order to make your automation more versatile and efficient.

      System Facts

      Ansible collects a series of detailed information about the managed nodes, such as network interfaces and operating system, and provides it as global variables called system facts. Facts can be used within playbooks to make your automation more versatile and adaptive, behaving differently depending on the system being provisioned.

      Templating System

      Ansible uses the Jinja2 Python templating system to allow for dynamic expressions and access to variables. Templates can be used to facilitate setting up configuration files and services. For instance, you can use a template to set up a new virtual host within Apache, while reusing the same template for multiple server installations.

      Support for Extensions and Modules

      Ansible comes with hundreds of built-in modules to facilitate writing automation for common systems administration tasks, such as installing packages with apt and synchronizing files with rsync, and also for dealing with popular software such as database systems (like MySQL, PostgreSQL, MongoDB, and others) and dependency management tools (such as PHP’s composer, Ruby’s gem, Node’s npm, and others). Apart from that, there are various ways in which you can extend Ansible: plugins and modules are good options when you need a custom functionality that is not present by default.

      You can also find third-party modules and plugins in the Ansible Galaxy portal.

      Getting Familiar with Ansible Concepts

      We’ll now have a look at Ansible terminology and concepts to help familiarize you with these terms as they come up throughout this series.

      Control Node

      A control node is a system where Ansible is installed and set up to connect to your server. You can have multiple control nodes, and any system capable of running Ansible can be set up as a control node, including personal computers or laptops running a Linux or Unix based operating system. For the time being, Ansible can’t be installed on Windows hosts, but you can circumvent this limitation by setting up a virtual machine that runs Linux and running Ansible from there.

      Managed Nodes

      The systems you control using Ansible are called managed nodes. Ansible requires that managed nodes are reachable via SSH, and have Python 2 (version 2.6 or higher) or Python 3 (version 3.5 or higher) installed.

      Ansible supports a variety of operating systems including Windows servers as managed nodes.

      Inventory

      An inventory file contains a list of the hosts you’ll manage using Ansible. Although Ansible typically creates a default inventory file when installed, you can use per-project inventories to have a better separation of your infrastructure and avoid running commands or playbooks on the wrong server by mistake. Static inventories are usually created as .ini files, but you can also use dynamically generated inventories written in any programming language able to return JSON.

      Tasks

      In Ansible, a task is an individual unit of work to execute on a managed node. Each action to perform is defined as a task. Tasks can be executed as a one-off action via ad-hoc commands, or included in a playbook as part of an automation script.

      Playbook

      A playbook contains an ordered list of tasks, and a few other directives to indicate which hosts are the target of that automation, whether or not to use a privilege escalation system to run those tasks, and optional sections to define variables or include files. Ansible executes tasks sequentially, and a full playbook execution is called a play. Playbooks are written in YAML format.

      Handlers

      Handlers are used to perform actions on a service, such as restarting or stopping a service that is actively running on the managed node’s system. Handlers are typically triggered by tasks, and their execution happens at the end of a play, after all tasks are finished. This way, if more than one task triggers a restart to a service, for instance, the service will only be restarted once and after all tasks are executed. Although the default handler behavior is more efficient and overall a better practice, it is also possible to force immediate handler execution if that is required by a task.

      Roles

      A role is a set of playbooks and related files organized into a predefined structure that is known by Ansible. Roles facilitate reusing and repurposing playbooks into shareable packages of granular automation for specific goals, such as installing a web server, installing a PHP environment, or setting up a MySQL server.

      Conclusion

      Ansible is a minimalist IT automation tool that has a gentle learning curve, thanks in part to its use of YAML for its provisioning scripts. It has a great number of built-in modules that can be used to abstract tasks such as installing packages and working with templates. Its simplified infrastructure requirements and accessible syntax can be a good fit for those who are getting started with configuration management.

      In the next part of this series, we’ll see how to install and get started with Ansible on an Ubuntu 20.04 server.



      Source link

      New Survey Report: The State of IT Infrastructure Management


      What is the state of enterprise IT infrastructure, and what insights can we glean from the perspectives of the IT professionals responsible for its management and operation?

      To answer these questions and more, INAP surveyed 500 IT professionals with data center, server and cloud infrastructure responsibilities at companies in the U.S. and Canada to create the second annual State of IT Infrastructure Management report.

      In this year’s report, we delve further into what’s driving the decline of on-premise data centers and highlight the factors associated with successful infrastructure strategies in the hybrid and multicloud era. Plus, we highlight where the results show an acceleration of the major themes established in last year’s survey.

      Download the report and read on to learn what we discovered.

      DOWNLOAD THE REPORT

      Key Trends and Takeaways from the Latest Survey

      Strategic Room for Improvement

      We asked IT pros to assign a letter grade to their current infrastructure strategy and found that a majority of IT pros don’t think their current infrastructure strategies deserves a top grade. Only 1 in 4 (25.2 percent) respondents, gave their infrastructures an A. In the report, we narrow down what factors earned the top grade, and the areas for improvement for those who assigned their infrastructures a lower grade.

      The Decline of On-Prem Accelerates

      The next three years will see a significant reduction in the number of workloads powered by on-premise data centers or server rooms. Continuing the trend noted in last year’s report, 88 percent of survey participants expect to move at least part of their workloads off-premise over the next three years. Learn which solutions will be top destinations for these latest migrations in the report.

      9 in 10

      Performance Trumps Economics

      Network performance emerges as the top reason for moving more workloads to colocation facilities or the cloud, while economic factors like expected cost savings of closing down on-premise facilities come in fifth. We’ve identified the ‘Big 4’ reasons driving the off-prem migration, all of which make a compelling case for why the death of the on-premise data center is perhaps inevitable within the next decade.

      Monitoring Leads List of Routine Time Drains

      Nearly half of IT professionals who say infrastructure monitoring is among their job responsibilities feel they are spending too much time on it—the No. 1 time drain for the second consecutive year. We asked these professionals again what they would do if they were able to remove routine activities like server monitoring and maintenance. Last year, the No. 1 answer was reclaiming work-life balance. This year, that answer fell to the No. 3 spot. Learn more about what professionals would do with 16 hours back by downloading the report below.

      monitoring

      The Leadership Disconnect

      On several issues—department headcount, optimism around strategy, efficacy of hybrid and multicloud—senior IT leaders hold starkly different views than non-senior infrastructure managers. Throughout the report, we explore these disparities and point to potential reasons for these differences in opinion.

      Take a Deeper Dive

      To read about these insights and more, download the report below—and keep an eye on our ThinkIT blog over the next few weeks as we break down each of these topics in greater depth.

      New Survey Report: The State of IT Infrastructure Management

      READ THE REPORT

      Laura Vietmeyer


      READ MORE



      Source link