We’re excited to announce general availability of Ansible support in IBM Cloud Schematics. 

If you haven’t had a chance to get hands-on during the Open Beta, this post will get you up to speed. Using Actions in IBM Cloud Schematics, you can now run Ansible playbooks against your inventory of IBM Cloud resources.

What is Schematics?

Schematics is an IBM Cloud service that provides powerful tools to enable automation with Infrastructure as Code (IaC). Essentially, IaC allows you to “codify” your cloud environments so you can eliminate manual configuration steps and reduce the potential for human error.

Schematics is powered by open source capabilities underneath the hood, using a combination of two major capabilities to deliver the end-to-end infrastructure automation capabilities:

  • Terraform excels at the provisioning of services using a declarative approach.
  • Ansible is primarily used for configuration management and application deployment.

The key advantage of Schematics lies in allowing you to declare the automation tasks you need within the service and letting us run it for you. Using an “as-a-service” experience, you can avoid managing an environment to run and maintain your Ansible and Terraform executions. In addition, we offer key integrations with IBM Cloud services, including the following:

What is Ansible?

Ansible is an open source software-provisioning, configuration-management and application-deployment tool originally developed by Red Hat. Here’s a few examples where Ansible excels:

  • Deploying applications on VSIs on VPC Gen 2
  • Installing OS updates on VSIs
  • Configuring IBM Cloud resources post-provisioning
  • Deploying containers to managed Kubernetes clusters (such as IBM Cloud Kubernetes Service)

Learn more about Ansible:

Getting started with Actions

Let’s see how we can deploy an Action that can simply start, stop or restart a VSI on VPC Gen 2 in IBM Cloud. First, you’ll need a VSI on VPC Gen 2 infrastructure in IBM Cloud and an attached SSH key. You can follow the instructions in the VPC docs here to get the prerequisites created. Once completed, you should have a running VSI that looks something like this:

Create your first Action

  1. Navigate to Schematics Actions and click Create Action.
  2. Name your action, keep the default settings and hit Create:
  3. Input the repository “https://github.com/Cloud-Schematics/ansible-is-instance-actions” into the GitHub field and hit Retrieve Playbooks:

    Note: Feel free to inspect the playbooks in the GitHub repo to learn how they work. When you run this playbook, Schematics securely connects to the target VSI by using the SSH key that you configured when you created the VSI. You could also fork this repository if you wanted to make updates to the Ansible playbooks prior to importing.

  4. Once the playbooks have been retrieved, choose the stop-vsi-playbook.yml playbook, and open the Advanced options to set the instance_ip to the “Private IP” of your VSI in the VPC dashboard. Then, hit Save:
  5. Once the Action is saved, hit Check Action to do a “dry run” to ensure everything is working properly. When it comes back successfully, hit Run Action and wait for it to finish executing:
  6. Finally, go back to your VSI dashboard — your machine should be stopped!

What’s next?

This was a very simple demonstration of using Actions powered by Ansible to stop a VSI. In our more advanced templates that are published in our documentation and template repository (links below), we showcase multi-tier VPC deployments, use of bastion hosts, enabling dynamic inventories from Schematics workspaces and much more. Dive in by checking out the following resources:

Questions or comments? You can reach me at svennam@us.ibm.com.

Categories

More from Announcements

IBM TechXchange underscores the importance of AI skilling and partner innovation

3 min read - Generative AI and large language models are poised to impact how we all access and use information. But as organizations race to adopt these new technologies for business, it requires a global ecosystem of partners with industry expertise to identify the right enterprise use-cases for AI and the technical skills to implement the technology. During TechXchange, IBM's premier technical learning event in Las Vegas last week, IBM Partner Plus members including our Strategic Partners, resellers, software vendors, distributors and service…

Introducing Inspiring Voices, a podcast exploring the impactful journeys of great leaders

< 1 min read - Learning about other people's careers, life challenges, and successes is a true source of inspiration that can impact our own ambitions as well as life and business choices in great ways. Brought to you by the Executive Search and Integration team at IBM, the Inspiring Voices podcast will showcase great leaders, taking you inside their personal stories about life, career choices and how to make an impact. In this first episode, host David Jones, Executive Search Lead at IBM, brings…

IBM watsonx Assistant and NICE CXone combine capabilities for a new chapter in CCaaS

5 min read - In an age of instant everything, ensuring a positive customer experience has become a top priority for enterprises. When one third of customers (32%) say they will walk away from a brand they love after just one bad experience (source: PWC), organizations are now applying massive investments to this experience, particularly with their live agents and contact centers.  For many enterprises, that investment includes modernizing their call centers by moving to cloud-based Contact Center as a Service (CCaaS) platforms. CCaaS solutions…

See what’s new in SingleStoreDB with IBM 8.0

3 min read - Despite decades of progress in database systems, builders have compromised on at least one of the following: speed, reliability, or ease. They have two options: one, they could get a document database that is fast and easy, but can’t be relied on for mission-critical transactional applications. Or two, they could rely on a cloud data warehouse that is easy to set up, but only allows lagging analytics. Even then, each solution lacks something, forcing builders to deploy other databases for…