command | description |
---|---|
ctrl + a | Goto BEGINNING of command line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1. Fill in your module name | |
# 2. Run the terraform state mv commands from the output | |
# Pipeline steps: | |
# Generate plan | |
# Remove ANSI colour codes | |
# Generate state mv commands | |
# Strip any moves of numbered instances of a resource (i.e. from using count) |
- command line values (for example, -u my_user, these are not variables)
- role defaults (defined in role/defaults/main.yml)
- inventory file or script group vars
- inventory group_vars/all
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main { | |
Update-Windows-Configuration | |
Install-Utils | |
Install-Browsers | |
Install-Fonts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gcloud compute instances list - format="csv(name,labels.app-name,labels.biz-unit,labels.env-name,metadata.items.server-role,metadata.items.server-type, metadata.items.os-image)" | |
name,app-name,biz-unit,env-name,server-role,server-type,os-image | |
app-server-1,misc,ecom,prod,app,tomcat,centos | |
web-server-1,misc,ecom,prod,web,nginx,centos | |
web-server-2,misc,ecom,prod,web,nginx,centos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ system ? builtins.currentSystem }: | |
let | |
pkgs = import <nixpkgs> { inherit system; }; | |
callPackage = pkgs.lib.callPackageWith (pkgs // self); | |
self = with pkgs; { | |
etlegacy = callPackage_i686 ./etlegacy.nix {}; | |
}; | |
in self.etlegacy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ system ? builtins.currentSystem }: | |
let | |
pkgs = import <nixpkgs> { inherit system; }; | |
callPackage = pkgs.lib.callPackageWith (pkgs // self); | |
self = with pkgs; { | |
etlegacy-x86 = callPackage_i686 ./etlegacy-x86.nix { usePrecompiledModLibs = true; }; | |
etlegacy-x86_64 = callPackage ./etlegacy-x86_64.nix { usePrecompiledModLibs = true; }; | |
}; | |
in self.etlegacy-x86 # or self.etlegacy-x86_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vagrant With Windows, WSL2 and Hyper-V | |
To say getting this configuration working is a pain in the ass is an understatement. However, once it is working correctly you gain access to tools like Ansible and full performance VMs inside Windows. This guide covers the steps I followed to get things working correctly with this configuration. It is possible that something may not work for you however I have been able to reproduce this success on two Windows 11 Pro machines and expect this to work for others. | |
This guide assumes basic knowledge of Windows and Linux systems and how Vagrant operates. Due to the difficulty of setting this up you may need to do some additional troubleshooting | |
## Requirements | |
* Windows Professional - Hyper-V can only be installed on Windows Professional systems or higher | |
* WSL2 - Due to the massive differences between WSL1 and WSL2 this guide will only cover support for WSL2 | |
* CPU Virtualization - While the vast majority of modern CPUs support virtualization you may need to enable it in |
A new experimental feature was added by Microsoft that will resolve this issue in the future. You will need to update to Windows Insider Build for Windows 10 or latest Windows 11 and update WSL. More info here.
On WSL1
we can access windows services running on localhost
ports directly, but when WSL2
was introduced things started breaking. One of those issue is access to windows localhost ports [^1]
To understand this issue we need to learn what is WSL2:
- WSL2 is a Managed Virtual Machine Running on Windows contrary to WSL1.
- Windows implements a virtual NIC for WSL2 thus the distro's host ip is different from the Windows host ip. [^2]