Code Monkey home page Code Monkey logo

new-machine's Introduction

New-Machine

This repo contains several small PowerShell scripts that utilize Chocolatey and BoxStarter to setup new machines to my preferences. I've found golden images to go out of date extremely quickly, to the point of making it pointless. These scripts help grab the latest versions of many of my daily use applications, so that I can hit the ground running on new machines.

Important Note!

This is mostly crafted based on my own use cases and work that I do. I built but no longer use the Windows 10 images, so they may not work as expected anymore. My current preferred working image is Windows Server 2022.

Creating a Bootable USB

Use Rufus -- I had a PowerShell script but it failed a few times. Use the tools!

Building an Image

The Windows-2022.json Packer file references a copy of the Windows Server 2022 ISO. I grabbed it off of MSDN and put it into the same folder -- ideally, it would download this from a public source before building.

You can build the image via:

packer build windows-2022.json

Vagrant Info

Most of my builds now target Hyper-V as my hypervisor of choice, but should generally still work with VirtualBox or another target. Check out Packer Post-Processors for modifying for other targets [https://www.packer.io/docs/post-processors]

Depending on OS, follow instructions at vagrantup.com for installing + VirtualBox.

Windows via Chocolatey:

choco install virtualbox

choco install vagrant

vagrant box add {url} --name {name}

vagrant init {name}

The folder that you run initialize from, or that contains the vagrantfile that you use, will be imported into the Virtual Machine and available at c:\vagrant. Do note that I've noticed issues running IIS or Visual Studio from code in this folder.

You can modify the Vagrantfile generated during vagrant init to modify VM settings, such as the amount of RAM allocated (defaults to 8gigs) or more CPUs:

  config.vm.provider :virtualbox do |v, override|
      v.gui = false
      v.memory = 8192
      v.cpus = 2
  end

vagrant up

vagrant powershell (from Windows)

vagrant RDP -- Doesn't seem to work on OS-X reliably, use Remote Desktop client and point it to localhost with the allocated port.

You can also open your Remote Desktop client of choice and point it to localhost:4000 (we remapped the RDP port to avoid conflicts with Windows hosts).

See Also

https://chocolatey.org

https://www.packer.io

https://www.virtualbox.org

https://boxstarter.org

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.