Skip to main content

Posts

Showing posts from March, 2019

Retrieving EC2 instance information with PowerShell - Part 1

We're in a constant state of movement in the tech field. To ensure we can get everything done in a timely fashion, we must automate. Automation is huge in Cloud Engineering, and should be throughout all of IT. Today I'll show you a quick way to get some EC2 instance information with PowerShell. This will allow you to retrieve information right from the shell vs having to log into the UI.

First thing we want to do is ensure we have; 1. An AWS user that has programmatic access to your AWS console  2. AWS configured within PowerShell
Let's go ahead and create a new user. You will need admin rights to your AWS console.
First, sign in and go to IAM users. Click "Create new user".

I decided to name mine "powershell". The next thing we want to do is give that user specific permissions. Head over to groups and look for the "AmazonEC2FullAccess". Because we want to have the ability to not only read, but to create resources, I will choose full access.


A…

Setting up your cloud engineering Linux desktop environment

As technology professionals, we spend a TON of time in front of our computers. To be battle-station-ready, we need to have the right tools for the right job.

The first thing is the OS. For my Linux desktop, I like to use Elementary. It's an aptitude-based distro with a Mac-like feel. It's fast, steady, and I haven't had many problems. Remember to keep it up to date however. A cron job at every boot to run apt-update -y will do the trick.

https://elementary.io/

The next thing is your code-editor. A lot of distros come with one, but I prefer VSCode. VSCode has very quickly become a top-tier editor. The amazing amount of extensions alone makes it the top, if not, very close to the top. My top extensions are;

1. PowerShell
2. Python
3. Docker
4. Kubernetes
5. YAML

https://code.visualstudio.com/

Since I work on both Azure and AWS, I need PowerShell to manage Azure. For this, PowerShell Core is the way. Below is instructions depending on your distro.

https://docs.microsoft.com/e…

Developing on Azure with PowerShell

As we've all heard in our life at one point or another, "use the right tool for the job". When it comes to Azure, the right tool is PowerShell.

Today we're going to talk about how to connect to Azure with PowerShell and create a new VM.

Pre-Reqs:
1. An Azure account
2. A Resource Group within that Azure account
3. A Virtual Network and Subnet within that Azure account
4. A Security Group within that Azure account
5. Some former PowerShell knowledge
6. Admin rights on your machine.

The first thing we want to do is create a new connection between PowerShell on your machine and Azure. For this blog post, I'll be using Windows 10.

Let's go ahead and open up PowerShell as an administrator. Once you do that, we'll go ahead and run

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

We're setting it to "unrestricted" for the purposes of development and testing. In a production environment, it's best to use RemoteSigned to the scripts you run are s…