Open-source News

Automate OpenStack using Ansible

opensource.com - Tue, 02/21/2023 - 16:00
Automate OpenStack using Ansible ajscanlas Tue, 02/21/2023 - 03:00

I demonstrated how I manage OpenStack using Terraform in my previous article. Using Terraform as Infrastructure as Code (IaC) is a significant advantage, but it also requires the staff to support it. Sometimes, all you really need is the ability to provision infrastructure as timed resources, with no intention of building lasting data structures. When I design a flexible environment, I prefer the declarative language of Ansible.

Ansible's flexibility allows me to design for use cases that include:

  1. A test environment that's timed and can be deleted after use.
  2. A training environment provided for a specific amount of time and then destroyed.
  3. Moving from a manual to an automated infrastructure when Terraform is difficult because it maps your existing infrastructure.
Install Ansible and OpenStack SDK

First, you need to install Ansible and its SDK. For this, you must have Docker or Podman installed.

I use the pip installation of Ansible:

$ python3 -m pip install ansible-navigator --user

The ansible-navigator command gets used by AWX or Red Hat Ansible Automation Platform to run Ansible playbooks. Unlike the previous ansible-playbook or ansible ad-hoc commands, this creates a container and execution environment.

You must build your execution environment with an OpenStack SDK. For this, I strongly recommend the article by Gineesh Madapparambath on how to create an execution environment.

After creation, use your Ansible execution environment to configure your image:

$ ansible-navigator images

Choose which image to use and run a playbook:

$ ansible-navigator run main.yaml --stdout

More on Ansible 5 reasons to migrate to Red Hat Ansible Automation Platform 2 A quickstart guide to Ansible Ansible cheat sheet Free online course: Ansible essentials Download and install Ansible eBook: The automated enterprise eBook: Ansible for DevOps Free Ansible eBooks Latest Ansible articles Sample playbook

My sample playbook uses the same structure I demonstrated in my Terraform article:

$ cat >> main.yaml << EOF --- - hosts: localhost vars: flavors: - name: "small" ram: 4096 vcpus: 1 - name: "medium" ram: 8096 vcpus: 2 - name: "large" ram: 16384 vcpus: 4 - name: "xlarge" ram: 32768 vcpus: 8 tasks: - name: create flavors openstack.cloud.compute_flavor: state: present name: "{{ item.name }}" ram: "{{ item.ram }}" vcpus: "{{ item.vcpus }}" disk: 0 loop: - flavors - name: create external network openstack.cloud.network: state: present name: "external-network" provider_network_type: "flat" provider_physical_network: "physnet1" external: true - name: create external subnet openstack.cloud.subnet: state: present name: "external-subnet" network_name: "external-network" cidr: "10.0.0.0/8" gateway_ip: "10.0.0.1" dns_nameservers: - "10.0.0.254" - "10.0.0.253" allocation_pool_start: "10.0.0.2" allocation_pool_end: "10.0.254.254" - name: create external router openstack.cloud.router: name: "external-router" state: present network: "external-network" - name: create Cirros image openstack.cloud.image: name: cirros container_format: bare disk_format: qcow2 state: present filename: cirros-0.6.1-x86_64-disk.img - name: create Demo project openstack.cloud.project: state: present name: "Demo" enabled: True - name: create demo-user openstack.cloud.user: state: present name: "demo-user" password: "demo" default_project: "Demo" EOFResults

After you run the playbook, you get networks:

Image by:

(AJ Canlas, CC BY-SA 4.0)

You also get flavors:

Image by:

(AJ Canlas, CC BY-SA 4.0)

And images:

Image by:

(AJ Canlas, CC BY-SA 4.0)

And a demo project:

Image by:

(AJ Canlas, CC BY-SA 4.0)

The right tool

There's no single right or wrong answer for how you automate. How you implement your automation depends on your organization's needs, infrastructure, system design, and staff resources. Select one of the great open source tools out there to get started. Put in the effort now, and save yourself a lot of work in the future.

Ansible offers unique flexibility when automating your infrastructure.

Image by:

opensource.com

OpenStack Ansible Cloud Automation What to read next How to use GitOps to automate Terraform This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

My favorite open source tools for personal finance

opensource.com - Tue, 02/21/2023 - 16:00
My favorite open source tools for personal finance Don Watkins Tue, 02/21/2023 - 03:00

There are tons of open source personal finance apps out there. These apps are useful because they help you take control of your finances. I find it much easier to use an app rather than a spreadsheet or a ledger. Here are some of my favorite apps.

GnuCash

GnuCash is a popular open source personal finance or small business accounting program for Linux users. It is a full-featured double-entry accounting system that supports multiple accounts, investments, and currency conversions. The app also provides a variety of helpful financial tools, including budgeting, reporting, invoicing, and more. GnuCash is a great choice for users looking for a comprehensive and powerful financial management solution. GnuCash is my own personal favorite that I have been using every day for over six years. GnuCash can be installed from the command line or as a Flatpak depending on your distribution and personal choice. GnuCash is licensed with the Gnu Public License. GnuCash is also available for MacOS and Windows users too.

Homebank

Homebank is a free, open source personal finance app for Linux, Windows, and MacOS users. It easily imports files from Quicken, Microsoft Money, and other software. It also imports from popular bank formats OFX/QFX, QIF, and CSV. The source code for Homebank is freely available and licensed with GPL v 2.0. The project provides information about how to download and install it on your distribution or operating system.

Our favorite resources about open source Git cheat sheet Advanced Linux commands cheat sheet Open source alternatives Free online course: RHEL technical overview Check out more cheat sheets KMyMoney

KMyMoney is a cross-platform double-entry bookkeeping system for personal finance management built on KDE. It's similar in operation to popular proprietary personal finance applications. KMyMoney also supports multiple accounts and currencies, making it a great choice for users who need to manage their finances in multiple countries. Its latest stable release was in June 2021. It is licensed with the Gnu Public License. The project provides download images for Linux, Windows, and MacOS.

Skrooge

Skrooge is open source and available for download and installation on Linux and BSD. It's also available on Windows and MacOS. You can import accounts from many sources including AFB120, QIF, CSV, MT940, OFX,  and QFX. According to their website Skrooge can import transactions directly from all your banks' websites in one click. Skrooge provides excellent documentation, too.

These are just a few of the applications out there that can help you take control of your finances. Try one out or try them all out. See which one works best for you. To all my friends in the United States, don't forget to be ready for tax season!

 

Try one of these open source apps to keep your budget in check.

Image by:

Opensource.com

Tools Business What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

5 Best Lightweight Linux Distributions for Running Containers

Tecmint - Tue, 02/21/2023 - 13:02
The post 5 Best Lightweight Linux Distributions for Running Containers first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Are you looking for a Linux operating system optimized for running containers with minimal footprints, fast boot times, and a focus on security and stability? In this guide, we will review the top lightweight

The post 5 Best Lightweight Linux Distributions for Running Containers first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Btrfs Enjoys More Performance With Linux 6.3 - Including Some 3~10x Speedups

Phoronix - Tue, 02/21/2023 - 06:00
The big batch of Btrfs file-system driver updates for the Linux 6.3 kernel were submitted today by SUSE's David Sterba. As with many kernel cycles, this Btrfs pull includes more performance optimizations as well as new features...

Ubuntu's New Desktop Installer Working On Auto-Install, Active Directory Integration

Phoronix - Tue, 02/21/2023 - 04:00
While the new Ubuntu 23.04 desktop installer is shaping up nicely, Canonical engineers continue to be busy working on additional features and ironing out functionality found within the existing Ubiquity installer but not yet their new Flutter-based graphical installer...

Pages