Skip to content

Commit 93c9a9d

Browse files
GokuWorksGokuWorks
authored andcommitted
Merge branch 'terraform-guide-gokuworks' of https://github.com/GokuWorks/PCV2-Wiki into terraform-guide-gokuworks
2 parents 18c5d34 + 6ac4684 commit 93c9a9d

30 files changed

+676
-17
lines changed

.github/workflows/pre-commit.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: pre-commit
3+
4+
on: [pull_request, push]
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-python@v5
11+
with:
12+
cache: pip
13+
- run: python -m pip install pre-commit
14+
- uses: actions/cache@v4
15+
with:
16+
path: ~/.cache/pre-commit/
17+
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
18+
- run: pre-commit run --show-diff-on-failure --color=always --all-files

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
repos:
3+
- repo: https://github.com/gitleaks/gitleaks
4+
rev: v8.18.4
5+
hooks:
6+
- id: gitleaks
7+
args: [--baseline-path, .github/workflows/gitleaks-baseline.json]

LICENSE

Lines changed: 398 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# How to access Windows Instances on Openstack #
2+
3+
There are 2 main ways to get access and control a Windows Instance on Openstack. This tutorial will cover both methods.
4+
5+
## Prerequesites ##
6+
7+
* A newly created Windows Server Instance on Openstack
8+
* Access to Infra via OpenVPN OR On the Cyberlab Secure Network
9+
10+
11+
12+
## Method 1: Using the Openstack Console (Must be used for initial Windows Setup) ##
13+
14+
Openstack has a built-in console viewer for Instances which allows you to get a true console view of the Instance allowing for easier debugging of the Instance. You will have to use this method to initially setup Windows Server.
15+
16+
### Steps: ###
17+
1. On the left plane, choose `Compute` and then `Instances`
18+
![Instance page](../img/win-guide/instancespage.png)
19+
2. Click on the Instance to view
20+
![Instance page](../img/win-guide/instancespage2.png)
21+
3. Click on the `Console` tab
22+
![Instance page](../img/win-guide/consoletab.png)
23+
4. You now have a console view of the Instance! From here you can add an Administrator password to Windows and use the Instance!
24+
![Instance page](../img/win-guide/consoleview.png)
25+
26+
## Method 2: Using Remote Desktop Connection ##
27+
28+
Remote Desktop Connection (Also known as RDP somtimes) is a program in Microsoft Windows that allows you to access another Windows computer over a network. Using this method has added benefits such as easy folder sharing, viewing the Instance in full-screen mode, clipboard sharing and more!
29+
30+
By default, Openstack blocks all inbound connections to Instances and therefore we need to make a security group to allow inbound RDP access
31+
32+
Important Note: You cannot directly use this method on the very first time you startup your Instance as Windows requires you to set an Administrator password upon Instance creation. Follow Method 1 to gain initial access to the machine and add a password.
33+
34+
### Step 1: Creating a security group ###
35+
1. Connect to Infra via OpenVPN or `Cyberlab Secure`
36+
2. Go to `horizon.hackucf.cloud` and log into your account
37+
3. Click on `Network` on the left-hand pane and then `Security Groups`
38+
![Instance page](../img/win-guide/network_secgroup.png)
39+
4. On the right-hand side, click on `Create Security Group` and give it a name and description, then press `Create Security Group`
40+
![Instance page](../img/win-guide/creategroup.png)
41+
![Instance page](../img/win-guide/creategroup2.png)
42+
5. On the Manage Security Group Rules screen, click `Add rule`
43+
![Instance page](../img/win-guide/addrule.png)
44+
6. Choose the `RDP` Rule in the Rule dropdown, leave all other options as default and click `Add`
45+
![Instance page](../img/win-guide/addrule2.png)
46+
47+
This new group can be applied to any future Windows Instances to quickly allow RDP access
48+
49+
### Step 2: Adding the security group to your Instance ###
50+
1. On the left plane, choose `Compute` and then `Instances`
51+
![Instance page](../img/win-guide/instancespage.png)
52+
53+
54+
2. Click on the Instance to add the security group to
55+
![Instance page](../img/win-guide/instancespage2.png)
56+
57+
58+
3. Click the dropdown arrow on the right and select `Edit Security Groups`
59+
![Instance page](../img/win-guide/editsecgroup.png)
60+
61+
62+
4. Select the appropriate security group and select `Save`
63+
64+
![Instance page](../img/win-guide/choosesecgroup.png)
65+
66+
67+
RDP will now be allowed through the Openstack firewall for the instance!
68+
69+
### Step 3: Connecting to the instance ###
70+
1. Open your remote desktop client
71+
* Windows Clients: Open Start Menu > type in "Remote Desktop Connection"
72+
* MacOS Clients: [Windows App](https://apps.apple.com/us/app/microsoft-remote-desktop/id1295203466?mt=12)
73+
* Linux Clients: [Remmina](https://remmina.org/)
74+
2. Enter the IP address of your Instance and press `Connect` (You can find this in Compute > Instances)
75+
76+
![Instance page](../img/win-guide/rdp.png)
77+
78+
3. Enter the credentials for the Instance and select OK
79+
80+
![Instance page](../img/win-guide/rdp2.png)
81+
82+
4. You will be successfully connected to the Instance!
83+
84+
![Instance page](../img/win-guide/rdp_final.png)
85+
86+
87+
## Retrieving Windows Password #
88+
89+
To retrieve the Windows password for an instance in OpenStack Horizon, you need to follow these steps. This process assumes that you have created the instance with an SSH key, which is necessary for decrypting the password.
90+
91+
### Step 1: Creating an Instance with an SSH Key ##
92+
93+
1. On the left pane, choose `Compute` and then `Instances`.
94+
2. Click on `Launch Instance`.
95+
3. Fill in the necessary details for your instance, such as the instance name and flavor.
96+
4. Under the `Key Pair` section, select an existing key pair or create a new one. This key pair will be used to decrypt the Windows password. **Ensure the key is a RSA key.**
97+
![RSA_key](../img/win-guide/rsa_key.png)
98+
99+
100+
### Step 2: Retrieving the Windows Password ##
101+
102+
1. On the left pane, choose `Compute` and then `Instances`.
103+
![Instance page](../img/win-guide/instancespage.png)
104+
2. Click on the instance for which you want to retrieve the password.
105+
![Instance page](../img/win-guide/instancespage2.png)
106+
3. Click on the `Actions` dropdown menu on the right and select `Retrieve Password`.
107+
![dropdown password](../img/win-guide/dropdown_password.png)
108+
4. In the `Retrieve Password` dialog, click on `Choose File` and upload the private key file associated with the SSH key pair used during instance creation.
109+
![retrieve password](../img/win-guide/retrieve_password.png)
110+
5. Click on `Decrypt Password`. The decrypted password will be displayed.
111+
112+
You can now use this password to log in to your Windows instance via the OpenStack console or Remote Desktop Connection.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# How to use Cyberlab Secure on Linux
2+
3+
1. Install nm-connection-editor
4+
- **Ubuntu**
5+
```
6+
sudo apt update &&
7+
sudo apt install network-manager-gnome
8+
```
9+
10+
- **Fedora**
11+
```
12+
sudo dnf install nm-connection-editor
13+
```
14+
15+
- **Arch**
16+
```
17+
sudo pacman -S network-manager-applet
18+
```
19+
20+
21+
??? note "Note about compatibility"
22+
23+
This should work on most distributions that use NetworkManager and wpa_supplicant. If you are using a different network manager, you may need to use a different tool to connect to Cyberlab Secure.
24+
Other distros are officially unsupported, but you can try to use the nm-connection-editor tool to connect to Cyberlab Secure.
25+
26+
27+
2. Run nm-connection-editor
28+
```bash
29+
sudo nm-connection-editor
30+
```
31+
32+
3. Click on the + button to add a new connection
33+
- ![Select the plus on the bottom left](../img/linux-cyberlab-secure/nm-step-1.png)
34+
35+
4. Select Wifi and click Create
36+
- ![Select Wifi and click Create](../img/linux-cyberlab-secure/nm-step-2.png)
37+
38+
5. In the wifi tab fill in the following:
39+
* Connection Name: `Cyberlab Secure`
40+
* SSID: `Cyberlab Secure`
41+
* Mode: `Client`
42+
* Band: `Automatic`
43+
* Device: `leave blank`
44+
* MAC Address: `leave blank`
45+
* Cloned MAC Address: `leave blank`
46+
* MTU: `Automatic`
47+
* Available to all users: `checked`
48+
* All other fields can be left as default
49+
* ![Fill in the fields](../img/linux-cyberlab-secure/nm-step-3.png)
50+
51+
6. In the wifi security tab fill in the following:
52+
* Security: `WPA & WPA2 Enterprise`
53+
* Authentication: `Protected EAP (PEAP)`
54+
* Anonymous Identity: `leave blank`
55+
* Domain: `leave blank`
56+
* CA Certificate: `leave blank`
57+
* Check box for No CA certificate is required
58+
* PEAP Version: `Automatic`
59+
* Inner Authentication: `MSCHAPv
60+
* Username: `Your SSO Username`
61+
* Password: `Your SSO Password`
62+
* ![Fill in the fields](../img/linux-cyberlab-secure/nm-step-4.png)
63+
64+
7. Select Save
65+
66+
8. Connect to the network
67+
The Cyberlab Secure network should be available where you normally connect to Wi-Fi. If not, run
68+
```bash
69+
nmcli connection up "Cyberlab Secure"
70+
```
71+
72+
73+
### Troubleshooting
74+
75+
If you are having trouble connecting to the network, try the following steps:
76+
77+
1. Run ``sudo journaclctl -u NetworkManager`` to see if there are any errors
78+
79+
2. Run ``sudo journalctl -u wpa_supplicant`` to see if there are any errors
80+
81+
3. Create ticket in infra help desk

docs/guides/OpenStack Setup Guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1. Go to [https://openvpn.net/client/](https://openvpn.net/client/).
1212
2. Download the appropriate version of OpenVPN for your operating system and install it.
1313

14-
### For Windows:
14+
### For Windows:
1515

1616
- Press the Windows key and search for OpenVPN.
1717
- Run OpenVPN.
@@ -25,14 +25,14 @@
2525
- Press "Connect".
2626
- In the future, navigate to the OpenVPN client and select the on switch labeled "vpn.hackucf.org".
2727

28-
### For Windows 10 Users:
28+
### For Windows 10 Users:
2929

3030
- If you don't already have the new Windows Terminal, download it from [https://aka.ms/terminal](https://aka.ms/terminal).
3131

3232
## Step 3: Create SSH Key
3333

3434
1. Open a terminal.
35-
2. Run `ssh-keygen`.
35+
2. Run `ssh-keygen -t rsa`.
3636
3. Press Enter to save the key in the default location.
3737
4. Press Enter for an empty passphrase.
3838
5. Press Enter again to confirm.

docs/guides/Troubleshooting.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Troubleshooting
2+
3+
This page provides methods for troubleshooting problems the end user may run into.
4+
5+
## Hackucf DNS records not resolving:
6+
7+
## Recommended Fix
8+
Set your DNS to cloudflare's dns servers. Follow the instructions [located on their website](https://one.one.one.one/dns/)
9+
10+
### Fix for Custom DNS Users
11+
12+
If you run your own local DNS and you cannot resolve horizon.hackucf.cloud with nslookup, then you will need to add the following to your Records.
13+
14+
**DNS Records:**
15+
16+
| Domain | IP Address |
17+
|----------------|------------|
18+
| cloud.hackucf | 10.4.4.10 |
19+
20+
**CNAME Records:**
21+
22+
| FQDN | Domain |
23+
|---------------------|---------------|
24+
| horizon.hackucf.cloud | cloud.hackucf |
25+
| api.hackucf.cloud | cloud.hackucf |
39.5 KB
Loading
51.7 KB
Loading
42.2 KB
Loading

0 commit comments

Comments
 (0)