Tag: git

  • Setting up a new Windows Laptop with DevOps tools.

    Setting up a new Windows Laptop with DevOps tools.

    About

    This guide is meant as a general guide to set up a Windows machine with a suite of DevOps tools. This guide assumes the user has a working knowledge of these tools. It is not meant for a novice.

    This setup is being performed on a brand new Windows 11 Home Intel Core i9 with 32MB RAM.

    Programming Languages

    Python

    Python is an open source programming language that can run on many different architectures. It has a syntax that is easy to learn and is notable as a learning language,

    Head over to https://www.python.org/downloads/ and download the latest version of Python. As of this writing, version 3.10.1 is available.

    Run the installer an make sure you add python to PATH. Open a command prompt and test with:

    python –version

    Coding IDE

    My preference is VS Code. A good IDE is a MUST for any DevOps engineer.

    Visual Studio Code

    Visual Studio Code is a source-code editor made by Microsoft for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.

    https://en.wikipedia.org/wiki/Visual_Studio_Code

    Free and is very customizable. Head on over to https://code.visualstudio.com/docs/?dv=win to download the installer. Version 1.63 is available as of this writing.

    PyCharm

    alternative, Python specific

    Source Code Management

    The goal of any successful engineer is to have repeatable and reproducible methods. This goal can be achieved by storing all work in a repository. Git is the most common SCM at this point in time.

    Store your source for free on github or gitlab. Download the git CLI from https://git-scm.com/download/win

    Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

    https://git-scm.com/

    Virtualization

    VirtualBox

    VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2. See “About VirtualBox” for an introduction.

    https://www.virtualbox.org/

    As of this writing, version 6.1.30 is available. Download the Windows installer here: https://www.virtualbox.org/wiki/Downloads

    Infrastructure Automation

    aws-cli

    https://aws.amazon.com/cli/

    vagrant

    https://www.vagrantup.com/

    Plugins (additional)

    vagrant plugin install vagrant-disksize

    terraform

    download here https://www.terraform.io/downloads

    Alternately install with chocolatey:

    choco install terraform

    Docker

    https://www.docker.com/products/docker-desktop

    uh oh for WSL 2

    https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4—download-the-linux-kernel-update-package

    chocolatey

    Chocolatey is a software management solution unlike anything else you’ve ever experienced on Windows. Chocolatey brings the concepts of true package management to allow you to version things, manage dependencies and installation order, better inventory management, and other features.

    https://chocolatey.org/
    1. First, ensure that you are using an administrative shell – you can also install as a non-admin, check out Non-Administrative Installation.
    2. Install with powershell.exe📝 NOTE: Please inspect https://community.chocolatey.org/install.ps1 prior to running any of these scripts to ensure safety. We already know it’s safe, but you should verify the security and contents of any script from the internet you are not familiar with. All of these scripts download a remote PowerShell script and execute it on your machine. We take security very seriously. Learn more about our security protocols.With PowerShell, you must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.
      • Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.Now run the following command:
      • Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://community.chocolatey.org/install.ps1’))
    3. Paste the copied text into your shell and press Enter.
    4. Wait a few seconds for the command to complete.
    5. If you don’t see any errors, you are ready to use Chocolatey! Type choco or choco -? now, or see Getting Started for usage instructions.

    Additional Tools

    mRemoteNG

    mRemoteNG is a fork of mRemote: an open source, tabbed, multi-protocol, remote connections manager for Windows. mRemoteNG adds bug fixes and new features to mRemote and allows you to view all of your remote connections in a simple yet powerful tabbed interface.

    https://mremoteng.org/

    This is a tool for all remote connections. Supports VNC, RDP, SSH, and others, all in a single GUI Interface. PuTTY is used in the backend for SSH connections. Download the latest version here: https://mremoteng.org/download

  • Connection problems to github.com

    One of my colleagues had a small issue with pulling the latest from github for my site today. The error was:

    ssh: connect to host github.com port 22: Connection refused
    fatal: The remote end hung up unexpectedly
    

    Of course the word “fatal” would freak out any non linux user. So a with a little searching the following is the solution.

    Add the following to your ./.ssh/config:

    host github.com
        hostname ssh.github.com
        port 443
    

    This forces ssh over https for github. All fixed! Now I do not have to bother networking for a firewall rule.