Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

2017-02-20

Python / Linux / VMware 4: Linking PyCharm to GitHub via SSH

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the fourth of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

Part 1: Installing VMware and CentOS
Part 2: Expanding CentOS's Minimal Install
Part 3: Installing Python 3.6
This is Part 4: Linking PyCharm to Github via SSH
Part 5: Running through Git-It again, this time with PyCharm

In this post I'm going to configure PyCharm to use GitHub for version control (then I'm going to get it working with SSH). This will let me accomplish two things:
  • It will let me work more easily from multiple machines on the same code.
  • It will make it easier for me to review or assist with other projects that are on my radar, because those are also in GitHub.

What is GitHub?


First, GitHub is not git. git is a version control tool written by Linus Torvalds, the guy responsible for Linux. Think of it as a series of snapshots of your code - so you can say 'oops, I really screwed this up, I want to go back to what I had 36 hours ago.'

GitHub is an online, web-based version control repository (with some other cool features, too). Imagine taking all of those incremental snapshots (with git) and saving them to DropBox or Google Drive. GitHub accomplishes this, but because it is specifically designed around this sort of purpose, it does it really, really well. This provides a few benefits:
  • It allows multiple people to work on the same project without the need for a common physical network. I can concurrently collaborate on code with colleagues in Kansas, Colorado, Kenya and Kuala Lumpur.
  • It allows work to continue on the same code, from multiple machines - I can make a lot of progress on my system at home, but if I have an idea while I'm at work, I can make a change without waiting to get back to my home system.

2017-02-08

Python / Linux / VMware 3: Installing Python 3.6

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the third of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

Part 1: Installing VMware and CentOS
Part 2: Expanding CentOS's Minimal Install
This is Part 3: Installing Python 3.6
Part 4: Linking PyCharm to Github via SSH
Part 5: Running through Git-It again, this time with PyCharm

I'm going to install the most recent version of Python, which at the moment is 3.6.0. I want to use the latest version for two reasons:
  • To align with the book that I'm using, which focuses on version 3
  • To experience software installation that's a bit more involved than yum install
This means that I'm going to need to download the source and compile it.

It's important to know that Python 2.7 is already installed, since it's a default part of most Linux distributions. Because of this, if I just install Python 3 without changing some of the standard installation behavior, I'm going to create trouble for myself later; the default Python installation and version are used by some important Linux system tools, which I'd rather not break.

2017-02-04

Python / Linux / VMware 2: Expanding CentOS's Minimal Install

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the second of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

Part 1: Installing VMware and CentOS
This is Part 2: Expanding CentOS's Minimal Install
Part 3: Installing Python 3.6
Part 4: Linking PyCharm to Github via SSH
Part 5: Running through Git-It again, this time with PyCharm

At this point, I'm working with a CentOS 7 virtual machine based on a Minimal Install. I have Internet connectivity, and have used yum update to make sure that all currently installed packages are at their latest versions.

Today I'm going to install the things I need to get started working in Python 3.6 in a graphical IDE. I could have taken care of all of this by using something other than the Minimal Install when I installed CentOS, but where's the fun in that?

Linux-based systems use a Package Manager to find and install software. CentOS uses yum so that's what I'll be playing with today. On Debian and Ubuntu, apt or apt-get are more common; here is a good reference if you're more familiar with those than with yum.

Note that the next few sections explain my thought process as I figured out what I'd need to install (so it's easier for folks to tell me where I went wrong, if they spot something). If you want to skip straight to the actual install steps, then go to the Putting it all together section, further down the page.

Figuring out what to install: nslookup is inside of package bind-utils

When I had finished the preliminary installation of CentOS, before I tried to ping an IP address, I had first tried to use nslookup - and discovered that it is not included in the Minimal Install. That's a tool I will want to have available, but I want to find out a little bit more.

2017-01-31

Python / Linux / VMware 1: Installing CentOS

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the first of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

This is Part 1: Installing VMware and CentOS
Part 2: Expanding CentOS's Minimal Install
Part 3: Installing Python 3.6
Part 4: Linking PyCharm to Github via SSH
Part 5: Running through Git-It again, this time with PyCharm

Create the Virtual Machine

As part of creating your Virtual Machine, it's useful to already have an image of the operating system you want to install - so go to https://www.centos.org/download/ and click on Minimal ISO, then choose one of those files to download the latest version of CentOS. Odds are good that you're going to want the 64-bit version.

In VMware, click on Create a New Virtual Machine to start the wizard. You'll be prompted to choose your configuration type; stick with Typical and click on Next.

2017-01-29

Learning Python and Linux on VMware in Windows

I've been a reasonably technical guy for a long time, but I've lost touch over time with my technical roots as I've focused more on management and leadership. When I think about that too much, it makes me a little sad, because I always have a lot of fun figuring out technical puzzles or otherwise solving problems.

Sometimes this will bubble up into side projects. I've always been a fan of Excel (don't laugh) for data analysis and visualization, I've hunted down some elusive problems in data centers using my own Splunk server, I've learned a little bit of Groovy so I could do some automation in Jira, and so forth. These are almost always emergent, though, so I learn just enough to accomplish my specific goal, and then stop.

My background is in Windows (my first MCSE, for example, focused on NT 4.0 and Exchange 5.5) and storage (everything from tuning two-drive RAID-1 arrays to the bigger multi-rack stuff - DAS, SAN, NAS, JBODs, tape robots, etc). My Linux knowledge, though, has always been of the "learn what I need to know" variety. I'm sort of like an tourist that's memorized a good German phrasebook - I could be situationally proficient, but couldn't necessarily write an article for Welt.

2017-01-13

Blogger: "SSL or custom domain. Pick one."

So apparently Blogger (who hosts this site) only supports SSL on non-custom domains. I get to choose to use either my own "barwis.net" domain, or to support HTTPS, but not both.

My hope is that Google will one day introduce SSL support for custom domains. However, since they haven't done this since they acquired Blogger in 2003, I'm not exactly holding my breath.

    poo.

I've found two sites that discuss a partial workaround for this by using Cloudflare, but from what I can tell it requires a non-free Cloudflare account - and it's not that important to me yet. Apart from the Cloudflare solution, I'd love to hear if anybody knows of other ways to get this working. I'll purchase my own cert, of course, but this seems like it should be more straightforward than it's proving to be.

Update, Dec 2018:

I'm not sure when, but it looks like this has changed - custom domains have SSL support. All traffic to this site is now HTTPS-enabled - and any regular HTTP traffic is automatically redirected to HTTPS. Thanks, Google!