Files
.infineon/_-Review/iscn5cg3256cps.md
2024-11-06 12:39:13 -07:00

220 lines
8.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
created: 2024-01-14T02:28:59.264Z
type: note
updated: 2024-07-18T19:05:24.641Z
---
# ISCN5CG3256CPS
## OpenSSH
```PowerShell Administrator
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
# Install the OpenSSH Client
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
# Install the OpenSSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
```
```PowerShell Administrator
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program "C:\Windows\System32\OpenSSH\sshd.exe"
```
```PowerShell
ssh-keygen -t ed25519
```
```bash
puttygen "C:\Users\phares\.ssh\id_ed25519"
```
```PowerShell Administrator
copy $env:USERPROFILE\.ssh\id_ed25519.pub C:\ProgramData\ssh\authorized_keys
copy $env:USERPROFILE\.ssh\id_ed25519.pub C:\ProgramData\ssh\administrators_authorized_keys
icacls.exe "C:\ProgramData\ssh\authorized_keys" /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"
icacls.exe "C:\ProgramData\ssh\administrators_authorized_keys" /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"
code-insiders "C:\ProgramData\ssh"
```
## PowerShell Modules
```PowerShell
Save-Module -Name PSWindowsUpdate -Path "D:\Downloads\2024" -Repository PSGallery
mkdir "C:\Test\Modules\PowerShellGet\"
Save-Module -Name PowerShellGet -Path "C:\Test\Modules" -Repository PSGallery -MaximumVersion 2.1.0
Get-ChildItem -Path C:\Test\Modules\PowerShellGet\
Save-Module -Name PSWindowsUpdate -Path "C:\Test\Modules" -Repository PSGallery
Install-WindowsUpdate AcceptAll
Install-WindowsUpdate AcceptAll IgnoreReboot
```
## NGINX Conf
```bash Sat Jan 13 2024 19:37:23 GMT-0700 (Mountain Standard Time)
mkdir "C:\Windows\System32\Config\SystemProfile\AppData\Local\IFXApps"
powershell -command "Expand-Archive C:\Windows\System32\Config\SystemProfile\AppData\Local\IFXApps\nssm-2.24.zip C:\Windows\System32\Config\SystemProfile\AppData\Local\IFXApps"
L:
mkdir "L:\DevOps"
mkdir "L:\DevOps\Mesa_FI"
git clone https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_git/NGINX-Conf "L:\DevOps\Mesa_FI\NGINX-Conf"
cd "L:\DevOps\Mesa_FI\NGINX-Conf"
git checkout -q -b ISCN5CG3256CPS --no-track
git reset --soft "59d2ef6e445c5535736729915dd38d686ecc5a97"
git reset -q HEAD -- .
powershell -command "Expand-Archive C:\Windows\System32\Config\SystemProfile\AppData\Local\IFXApps\nginx-1.20.1.zip L:\DevOps\Mesa_FI\NGINX-Conf"
rmdir /s /q "L:\DevOps\Mesa_FI\NGINX-Conf\nginx-1.20.1\conf"
mklink /J "L:\DevOps\Mesa_FI\NGINX-Conf\nginx-1.20.1\conf" "L:\DevOps\Mesa_FI\NGINX-Conf\conf"
move "L:\DevOps\Mesa_FI\NGINX-Conf\conf\localhost.conf" "L:\DevOps\Mesa_FI\NGINX-Conf\conf\iscn5cg3256cps.conf"
code "L:\DevOps\Mesa_FI\NGINX-Conf"
```
```bash Administrator
L:
cd "L:\DevOps\Mesa_FI\NGINX-Conf\nginx-1.20.1"
nginx -t
"C:\Windows\System32\Config\SystemProfile\AppData\Local\IFXApps\nssm-2.24\win64\nssm.exe" install nginx
```
```yml NSSM-Application
Path: L:\DevOps\Mesa_FI\NGINX-Conf\nginx-1.20.1\nginx.exe
Startup Directory: L:\DevOps\Mesa_FI\NGINX-Conf\nginx-1.20.1
```
```yml NSSM-Details
Startup type: Automatic (Delay Start)
```
```yml NSSM-I/O
Input (stdin): start nginx
Output (stdout): L:\DevOps\Mesa_FI\NGINX-Conf\nginx-1.20.1\logs\service.out.log
Error (stderr): L:\DevOps\Mesa_FI\NGINX-Conf\nginx-1.20.1\logs\service.error.log
```
```bash Administrator
sc start nginx
sc query nginx
sc stop nginx
sc start nginx
```
## OpenSSL
```bash openssl crt
"C:\Users\phares\AppData\Local\Programs\Git\usr\bin\openssl" req -x509 -nodes -days 365 -newkey rsa:2048 -keyout "L:\DevOps\Mesa_FI\NGINX-Conf\conf\includes\iscn5cg3256cps.key" -out "L:\DevOps\Mesa_FI\NGINX-Conf\conf\includes\iscn5cg3256cps.crt" -config "L:\DevOps\Mesa_FI\NGINX-Conf\conf\includes\iscn5cg3256cps.conf"
```
## VSCode Settings
```bash
git clone https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_git/VS-Code-Settings-Phares "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares"
mkdir "C:\Users\Phares\.omnisharp"
rmdir /S /Q "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares\User"
rmdir /S /Q "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares\.omnisharp"
xcopy /s /e /h "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares" "L:\DevOps\Mesa_FI\VS-Code-Settings-OSS-Phares\" | REM "
xcopy /s /e /h "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares" "L:\DevOps\Mesa_FI\VS-Code-Settings-Insiders-Phares\" | REM "
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares\.omnisharp" "C:\Users\Phares\.omnisharp"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-OSS-Phares\.omnisharp" "C:\Users\Phares\.omnisharp"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Insiders-Phares\.omnisharp" "C:\Users\Phares\.omnisharp"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares\User" "C:\Users\Phares\AppData\Roaming\Code\User"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-OSS-Phares\user" "C:\Users\Phares\AppData\Roaming\VSCodium\User"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Insiders-Phares\user" "C:\Users\Phares\AppData\Roaming\Code - Insiders\User"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares\app-codium" "C:\Users\phares\AppData\Local\Programs\VSCodium\resources\app"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-OSS-Phares\app-codium" "C:\Users\phares\AppData\Local\Programs\VSCodium\resources\app"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares\app-code" "C:\Users\phares\AppData\Local\Programs\Microsoft VS Code\resources\app"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Insiders-Phares\app-codium" "C:\Users\phares\AppData\Local\Programs\VSCodium\resources\app"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-OSS-Phares\app-code" "C:\Users\phares\AppData\Local\Programs\Microsoft VS Code\resources\app"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Insiders-Phares\app-code" "C:\Users\phares\AppData\Local\Programs\Microsoft VS Code\resources\app"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares\app-insiders" "C:\Users\phares\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-OSS-Phares\app-insiders" "C:\Users\phares\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app"
mklink /J "L:\DevOps\Mesa_FI\VS-Code-Settings-Insiders-Phares\app-insiders" "C:\Users\phares\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app"
cd "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares"
git reset --hard
cd "L:\DevOps\Mesa_FI\VS-Code-Settings-OSS-Phares"
git reset --hard
cd "L:\DevOps\Mesa_FI\VS-Code-Settings-Insiders-Phares"
git reset --hard
cd ..
dir "C:/Program Files/dotnet/sdk"
code "L:\DevOps\Mesa_FI\VS-Code-Settings-Phares"
codium "L:\DevOps\Mesa_FI\VS-Code-Settings-OSS-Phares"
code-insiders "L:\DevOps\Mesa_FI\VS-Code-Settings-Insiders-Phares"
REM
```
## Tasks
- [x] Verdaccio
- [x] TFS PAT
- [x] Cloned File-Folder-Helper
- [x] Clipboard Helper
- [x] Install the remaining VSCode extensions
- [x] SECS/GEM DiDact
- [ ] BaGet
- [ ] Move Files from old laptop
- [ ] TFS Agent
- [ ] [build-tools](build-tools.md)
## WSL
```bash Wed Jul 17 2024 10:22:04 GMT-0700 (Mountain Standard Time)
wsl --unregister ubuntu
## Ubuntu
```
```bash Wed Jul 17 2024 10:22:06 GMT-0700 (Mountain Standard Time)
sudo -i
apt-get update
apt-get upgrade -y
timedatectl set-timezone America/Phoenix
apt-get install links unzip git nano ncdu -y
exit
```
```bash Wed Jul 17 2024 10:28:33 GMT-0700 (Mountain Standard Time)
wsl --export Ubuntu "L:\Ubuntu\Ubuntu-Docker-001.tar"
wsl --unregister Ubuntu
wsl --import Ubuntu-Docker Ubuntu-Docker "L:\Ubuntu\Ubuntu-Docker-001.tar"
```
```yaml Wed Jul 17 2024 10:28:36 GMT-0700 (Mountain Standard Time)
Name: Ubuntu-Docker
Command Line: wsl.exe -d Ubuntu-Docker
Tab Title: Ubuntu-Docker
```
```bash Wed Jul 17 2024 12:02:56 GMT-0700 (Mountain Standard Time)
su phares
cd /tmp
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# dockerd-rootless-setuptool.sh install
# https://docs.docker.com/go/rootless/
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world
docker ps -a
docker rm df
mkdir /opt/uptime-kuma
nano /opt/uptime-kuma/compose.yaml
```
```yaml Wed Jul 17 2024 13:33:16 GMT-0700 (Mountain Standard Time)
services:
uptime-kuma:
image: louislam/uptime-kuma:1
volumes:
- ./data:/app/data
ports:
# <Host Port>:<Container Port>
- 3010:3001
restart: unless-stopped
```
```bash Wed Jul 17 2024 13:33:24 GMT-0700 (Mountain Standard Time)
docker compose up -d
systemctl status docker
docker ps -a
docker logs -f --tail 50 uptime-kuma-uptime-kuma-1
exit
```