A fork of mtelver's day10 project
at main 122 lines 3.7 kB view raw view rendered
1 2``` 3./_build/install/default/bin/day10 health-check --cache-dir /home/mtelvers/cache/ --opam-repository /home/mtelvers/opam-repository 0install.2.18 4./_build/install/default/bin/day10 health-check --cache-dir /home/mtelvers/cache/ --opam-repository /home/mtelvers/opam-repository obuilder.0.6.0 5./_build/install/default/bin/day10 health-check --cache-dir /home/mtelvers/cache/ --opam-repository /home/mtelvers/opam-repository cohttp.6.1.0 6./_build/install/default/bin/day10 health-check --cache-dir /home/mtelvers/cache/ --opam-repository /home/mtelvers/opam-repository odoc.3.0.0 7``` 8 9``` 10./_build/install/default/bin/day10 ci --cache-dir /home/mtelvers/cache/ --opam-repository /home/mtelvers/opam-repository /home/mtelvers/day10 11``` 12 13 14# Windows 15 16Remove Windows Defender 17 18``` 19dism /online /disable-feature /featurename:Windows-Defender /remove /norestart 20``` 21 22Install OpenSSH and configure (Windows Server 2022 only) 23 24``` 25curl.exe -L https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.2.2.0p1-Beta/OpenSSH-Win64-v9.2.2.0.msi -o openssh-win64.msi 26start /wait msiexec /q /norestart /i openssh-win64.msi 27copy id_ed25519.pub c:\programdata\ssh\administrators_authorized_keys 28netsh advfirewall firewall set rule name="OpenSSH SSH Server Preview (sshd)" new profile=any enable=yes 29``` 30 31On Windows Server 2025, SSHD is already installed, but not enabled. 32 33``` 34sc config sshd start=auto 35net start sshd 36copy id_ed25519.pub c:\programdata\ssh\administrators_authorized_keys 37netsh advfirewall firewall set rule name="OpenSSH SSH Server (sshd)" new profile=any enable=yes 38``` 39 40Install Git and ensure you restart your shell before continuing. 41 42``` 43curl.exe -L https://github.com/git-for-windows/git/releases/download/v2.50.0.windows.1/Git-2.50.0-64-bit.exe -o c:\windows\temp\git.exe 44start /wait c:\windows\temp\git.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /TASKS="addtopath" 45``` 46 47Install Containerd. On the last line selection `ltsc2025` if using Windows Server 2025. 48 49``` 50curl.exe https://raw.githubusercontent.com/microsoft/Windows-Containers/refs/heads/Main/helpful_tools/Install-ContainerdRuntime/install-containerd-runtime.ps1 -o install-containerd-runtime.ps1 51Set-ExecutionPolicy Bypass 52.\install-containerd-runtime.ps1 -ContainerDVersion 2.1.3 -WinCNIVersion 0.3.1 -ExternalNetAdapter Ethernet -ContainerBaseImage mcr.microsoft.com/windows/servercore:ltsc2022 53``` 54 55Create `C:\Program Files\containerd\cni\conf\0-containerd-nat.conf` containing 56 57``` 58{ 59 "cniVersion": "0.3.0", 60 "name": "nat", 61 "type": "nat", 62 "master": "Ethernet", 63 "ipam": { 64 "subnet": "172.20.0.0/16", 65 "routes": [ 66 { 67 "gateway": "172.20.0.1" 68 } 69 ] 70 }, 71 "capabilities": { 72 "portMappings": true, 73 "dns": true 74 } 75} 76``` 77 78Install opam 79 80``` 81curl.exe -L https://github.com/ocaml/opam/releases/download/2.3.0/opam-2.3.0-x86_64-windows.exe -o c:\windows\opam.exe 82opam init -y 83``` 84 85Download and build mtelvers/hcn-namespace 86 87``` 88git clone https://github.com/mtelvers/hcn-namespace 89cd hcn-namespace 90opam install . --deps-only 91for /f "tokens=*" %i in ('opam env') do @%i 92dune build 93copy _build\install\default\bin\hcn-namespace.exe %LocalAppData%\opam\.cygwin\root\usr\local\bin 94``` 95 96Build this project 97 98``` 99git clone https://github.com/mtelvers/ohc -b tool 100cd ohc 101opam install . --deps-only 102dune build 103``` 104 105Run 106 107``` 108git clone http://github.com/ocaml/opam-repository c:\opam-repository 109mkdir c:\cache 110make -j 6 SYSTEM=windows-x86_64 OUTPUT_DIR=./output CACHE_DIR=c:\\cache OPAM_REPO=c:\\opam-repository all 111``` 112 113 114 115 116Next commit 117 118``` 119NEXT_MERGE=$(git rev-list --merges --reverse HEAD..upstream/master | head -1) 120git checkout $NEXT_MERGE 121``` 122