DevOps Tools on Solus

Hey everyone! Today we're going to dive into Solus.

Solus is a Linux operating system that uses the latest kernel and is always up to date. Their promise "Install today, update forever" holds true in my experience so far. Solus is also incredibly accessible for a home brew, rolling release distribution. I was able to install Nvidia drivers, RubyMine, IntelliJ, Visual Studio Code, and Google Chrome through their graphical software manager.

A bit of history, Solus was founded by Ikey Doherty, a Computer Engineer that spent more than four years working at Intel's Open Source Technology Center. When I said "home brew" earlier, I wasn't putting the system down, quite the opposite; as Solus is not derived from a separate distribution, like Ubuntu or Fedora (from Debian and RedHat, respectively). After resigning from Intel to pursue Solus full-time, Ikey and the team at Solus Project have taken the operating system to new levels. It is a distribution built by developers for developers. With that, comes DevOps too!

I wanted to see if setting up an operations environment was as easy as it is setting up a development environment. The three tools I wanted to test were Terraform, AWS-CLI, and Chef. Terraform was a given, as it's just a single executable.

Download from the website, extract the archive, and move the executable to /usr/bin or /opt (be sure to create an alias or PATH for the latter).

Test with terraformor terraform version

admindev@battlestation ~ $ terraform
Usage: terraform [-version] [-help] <command> [args]

The available commands for execution are listed below.
The most common, useful commands are shown first, followed by
less common or more advanced commands. If you're just getting
started with Terraform, stick with the common commands. For the
other commands, please read the help and docs before usage.

Common commands:
    apply              Builds or changes infrastructure
    ...

Done and DONE.

Next, I wanted to get the AWS-CLI on there. That was easy as well, thanks to the installer through pip.

Note, I have an alias for pip to use pip3

pip install awscli --upgrade --user

After the command completes, check ~/.local/bin for aws. Once you confirm that's there, export that path to your $PATH via cli or in your ~/.bashrc or ~/.bash_aliases

export PATH=~/.local/bin:$PATH

All that was left was to see if it was setup correctly.

aws configure prompted to enter my keys, region, and output. Success!

Finally, we have Chef.

Chef was definitely a tough one to figure out. Fortunately, the solution is via .deb packages.

Head over to the Chef DK web site and download the .deb package for the Debian Stretch DK.

Once there, head to your download directory. We're going to use the ar command to extract the .deb package.

ar vx chefdk_3.2.30-1_amd64.deb

Three packages come out of that. Throw the data.tar.gz into /opt

sudo tar zxvf data.tar.gz -C /opt

You can throw the control.tar.gz in /opt too, but make it a different folder (like ChefAdmin or something).

sudo tar zxvf control.tar.gz -C /opt/chef_admin

Head over to the chef_admin directory and (with sudo) run postinst

cd /opt/chef_admin && sudo ./postinst

You'll see Thanks for installing Chef DK!

Move on over to where you'll house your cookbooks. For me, it's ~/Projects/Scripts/Chef/cookbooks. One thing to remember is you'll need your .chef directory in the root of where your working (in my case, Chef/.chef). I created the knife.rb file and got my key from the Chef server. If you're making one from scratch versus downloading one, this is all you need:

current_dir = File.dirname(__FILE__)
log_level 	:info
log_location	STDOUT
node_name	"chris"
client_key	"#{current_dir}/chris.pem"
chef_server_url "https://chefserv/organizations/admindev"
cookbook_path 	["#{current_dir}/../cookbooks"]

Last thing to do is test a few commands to see if everything works.

Confirm your link to the server:

knife ssl fetch

If you see an error here, likely you're using your server's IP address when it's configured for the domain name. Without a DNS server, just add the IP and domain name to /etc/hosts

x.x.x.x    chefserver

Next, create a cookbook. A random name will work here or, if you have something in mind, use that name for the creation.

chef generate cookbook nginx

Verify that the cookbook generated successfully. Now, we can throw it on the server to complete our test.

Note, I backed up to ~/Projects/Scripts/Chef/ for this next command

knife upload cookbook cookbooks/nginx

Awesome. It's easy enough to verify on the Chef Server under Policy > Cookbooks.

Now, we are in business.

Thanks for reading! I fired up Solus for the purpose of rescuing my Debian installation. However, I found the live environment such a joy to use. I installed it and immediately became a fan. The rollBak is a proud supporter of the Solus Project. Check them out at their website.

DevOps Tools on Solus
Share this