You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test your changes before raising a Pull Request to merge your changes. In order to set things up for testing do the following:
15
+
You must test your changes before submitting a PR.
18
16
19
-
1. Set `$env:CHOCO_QSG_DEVELOP = $true`
20
-
1. The first step of the Guide will need amended to fetch from the `develop` branch:
17
+
You should test on a clean, supported operating system.
18
+
19
+
> NB: To save time in repeated testing from a clean environment, you can run the OfflineInstallPreparation script in your repository and copy the files directory before copying.
20
+
21
+
To test the quickstart environment:
22
+
23
+
1. Copy the repository directory over to `C:\choco-setup\files\` on the test machine. You do not need to copy the `.git` directory.
24
+
1. Open an elevated Windows PowerShell console.
25
+
1. Run `C:\choco-setup\files\Start-C4bSetup.ps1`, and continue through the guide steps as detailed in `README.md`.
26
+
1. Run `C:\choco-setup\files\Start-C4bVerification.ps1` and check that all tests pass.
27
+
28
+
## Testing a PR
29
+
30
+
Changes in a PR must be tested before merging. In order to set things up for testing do the following in an elevated Windows PowerShell terminal:
31
+
32
+
1. Set `$env:CHOCO_QSG_BRANCH` to the PR ID or Branch Name to download.
33
+
1. Run Quickstart Guide as documented, in the same session.
34
+
35
+
Example:
21
36
22
37
```powershell
38
+
$env:CHOCO_QSG_BRANCH = "< Insert PR ID or Upstream BranchName Here >"
1. Perform each step of the Quickstart Guide, and make sure the changes you have attempted to make work appropriately.
46
+
1. Run `Start-C4bVerification.ps1` and check that all tests pass.
32
47
1. If everything looks OK, push your branch and create your Pull Request.
33
48
34
-
## SSL Certificates for testing
49
+
## Creating a PR
50
+
51
+
Push your branch to a fork or repository, and create a new PR [here](https://github.com/chocolatey/choco-quickstart-scripts/compare).
52
+
53
+
You should fill out the issue template as much as possible.
35
54
36
-
Reach out to Stephen, and he can generate a Let's Encrypt certificate for you.
55
+
### Rebasing Your Branch
56
+
57
+
If something else has been merged since you created your branch, you should rebase your branch onto the new tip of `main`. If you'd already pushed the branch, you may need to force-push the new history over the upstream version. You can do this as follows:
Copy file name to clipboardExpand all lines: README.md
+35-10Lines changed: 35 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,19 +70,18 @@ Below are the minimum requirements for setting up your C4B server via this guide
70
70
71
71
> :warning:**DISCLAIMER**: This guide utilizes code from a GitHub repository, namely: [choco-quickstart-scripts](https://github.com/chocolatey/choco-quickstart-scripts). Though we explain what each script does in drop-down boxes, please do your due diligence to review this code and ensure it meets your Organizational requirements.
72
72
73
+
> :memo:**Offline Install**: If your C4B server does not have unrestricted access to the internet, you can download the `choco-quickstart-scripts` repository to a Windows machine that is connected to the internet and run `OfflineInstallPreparation.ps1`. This will use Chocolatey to save all of the required assets into the repository folder, which can then be transferred to the target C4B server.
74
+
73
75
### Step 1: Begin C4B Setup
74
76
75
-
> :exclamation:**[IMPORTANT]** All commands should be run from an **elevated** PowerShell window (and **not ISE**), by opening your PowerShell console with the `Run as Administrator` option.
77
+
> :exclamation:**[IMPORTANT]** All commands must be run from an **elevated** Windows PowerShell window (and **not ISE**), by opening your PowerShell console with the `Run as Administrator` option.
76
78
77
-
1. Open a PowerShell console with the `Run as Administrator` option, and paste and run the following code:
79
+
1. Open a Windows PowerShell console with the `Run as Administrator` option, and paste and run the following code:
@@ -97,9 +96,11 @@ Below are the minimum requirements for setting up your C4B server via this guide
97
96
> </ul>
98
97
> </details>
99
98
99
+
> :memo:**Offline Install**: You can now copy the `C:\choco-setup\` directory to any computer to continue the installation. To zip up that directory, run `Compress-Archive -Path C:\choco-setup\files\* -DestinationPath C:\choco-setup\C4B-Files.zip`. Move the archive to your new machine, and run `Expand-Archive -Path /path/to/C4B-Files.zip -DestinationPath C:\choco-setup\files -Force`. You should then run `Set-Location "$env:SystemDrive\choco-setup\files"; .\Start-C4bSetup.ps1`, and continue with the guide.
100
+
100
101
### Step 2: Nexus Setup
101
102
102
-
1. In the same **elevated** PowerShell console as above, paste and run the following code:
103
+
1. In the same **elevated** Windows PowerShell console as above, paste and run the following code:
103
104
104
105
```powershell
105
106
Set-Location "$env:SystemDrive\choco-setup\files"
@@ -121,7 +122,7 @@ Below are the minimum requirements for setting up your C4B server via this guide
121
122
> </ul>
122
123
> </details>
123
124
124
-
### Step 3: CCM Setup
125
+
### Step 3: Chocolatey Central Management Setup
125
126
126
127
1. In the same PowerShell Administrator console as above, paste and run the following code:
127
128
@@ -135,7 +136,7 @@ Below are the minimum requirements for setting up your C4B server via this guide
135
136
> <ul class="list-style-type-disc">
136
137
> <li>Installs MS SQL Express and SQL Server Management Studio (SSMS)</li>
137
138
> <li>Creates "ChocolateyManagement" database, and adds appropriate `ChocoUser` permissions</li>
138
-
> <li>Installs all 3 CCM packages (database, service, web), with correct parameters</li>
139
+
> <li>Installs all 3 Chocolatey Central Management packages (database, service, web), with correct parameters</li>
139
140
> <li>Outputs data to a JSON file to pass between scripts</li>
140
141
> </ul>
141
142
> </details>
@@ -208,7 +209,31 @@ Below are the minimum requirements for setting up your C4B server via this guide
208
209
209
210
> :mag: **FYI**: A `Readme.html` file will now be generated on your desktop. This file contains login information for all 3 web portals (CCM, Nexus, and Jenkins). This `Readme.html`, along with all 3 web portals, will automatically be opened in your browser.
210
211
211
-
### Step 6: Setting up Endpoints
212
+
### Step 6: Verification
213
+
214
+
1. In the same **elevated** PowerShell console as above, paste and run the following code:
If you expect services to be available at `chocoserver.yourcompany.com`, then your command would look like: `.\Start-C4bVerification.ps1 -Fqdn 'chocoserver.yourcompany.com'`
222
+
223
+
> <details>
224
+
> <summary><strong>What does this script do? (click to expand)</strong></summary>
225
+
> <ul class="list-style-type-disc">
226
+
> <li>Verifies Nexus Repository installation</li>
227
+
> <li>Verifies Central Management installation</li>
228
+
> <li>Verifies Jenkins installation</li>
229
+
> <li>Ensures system firewall is configured</li>
230
+
> <li>Ensures Windows Features are installed</li>
231
+
> <li>Ensures services are correctly configured</li>
232
+
> <li>Ensured README is created</li>
233
+
> </ul>
234
+
> </details>
235
+
236
+
### Step 7: Setting up Endpoints
212
237
213
238
1. Find the `Register-C4bEndpoint.ps1` script in the `choco-setup\files\scripts\` directory on your C4B Server. Copy this script to your client endpoint.
# This is a wildcard cert, we need to prompt for the intended CertificateDnsName
95
+
while ($CertificateDnsName-notlike$Matches.Subject) {
96
+
$CertificateDnsName=Read-Host-Prompt "$(if ($CertificateDnsName) {"'$($CertificateDnsName)' is not a subdomain of '$($Matches.Subject)'. "})Please provide an FQDN to use with the certificate '$($Matches.Subject)'"
0 commit comments