Skip to content

Commit f46e329

Browse files
Merge pull request #297 from chocolatey/patchReleaseLol
Updates Docs and Self-Signed Certificate Generation of DatabaseCredential
2 parents b2e59b8 + 6205e45 commit f46e329

File tree

4 files changed

+33
-47
lines changed

4 files changed

+33
-47
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ To test the quickstart environment:
2222

2323
1. Copy the repository directory over to `C:\choco-setup\files\` on the test machine. You do not need to copy the `.git` directory.
2424
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.
25+
1. Run `C:\choco-setup\files\Initialize-C4bSetup.ps1`, and continue through the guide steps as detailed in `README.md`.
26+
1. Run `C:\choco-setup\files\Test-C4bSetup.ps1` and check that all tests pass.
2727

2828
## Testing a PR
2929

@@ -43,7 +43,7 @@ Invoke-RestMethod "https://ch0.co/qsg-go" | Invoke-Expression
4343
```
4444

4545
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.
46+
1. Run `Test-C4bSetup.ps1` and check that all tests pass.
4747
1. If everything looks OK, push your branch and create your Pull Request.
4848

4949
## Creating a PR

Initialize-C4bSetup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ param(
4848
$DatabaseCredential = $(
4949
if ((Test-Path C:\choco-setup\clixml\chocolatey-for-business.xml) -and (Import-Clixml C:\choco-setup\clixml\chocolatey-for-business.xml).DatabaseUser) {
5050
(Import-Clixml C:\choco-setup\clixml\chocolatey-for-business.xml).DatabaseUser
51-
} elseif ($PSCmdlet.ParameterSetName -eq 'Install') {
51+
} else {
5252
[PSCredential]::new(
5353
"chocodbuser",
5454
(ConvertTo-SecureString "$(New-Guid)-$(New-Guid)" -Force -AsPlainText)

OfflineInstallPreparation.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ foreach ($Package in (Get-Content $PSScriptRoot\files\chocolatey.json | ConvertF
108108
"download", "$($Package.Name)"
109109
"--output-directory", $PackageWorkingDirectory
110110
"--ignore-dependencies"
111+
"--no-progress"
111112
)
112113
$ChocoArgs += switch ($Package.psobject.properties.name) {
113114
"Version" { "--version=$($Package.Version)" }

README.md

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ Below are the minimum requirements for setting up your C4B server via this guide
7777
> - Run the following to zip up your offline bundle: `Compress-Archive -Path ~\Downloads\choco-quickstart-scripts\choco-quickstart-scripts-main\* -DestinationPath ~\Downloads\C4B-Files.zip`.
7878
> - Transfer the `C4B-Files.zip` from your downloads folder to your offline system. All further steps will be carried out on the offline system.
7979
> - Run `Expand-Archive -Path \path\to\C4B-Files.zip -DestinationPath C:\choco-setup\files -Force` on your offline system.
80-
> - Run `Set-Location "$env:SystemDrive\choco-setup\files"; Set-ExecutionPolicy Bypass Process; .\Start-C4bSetup.ps1` on your offline system.
81-
> - Proceed to Step 2!
80+
> - Proceed to Certificate Options!
8281
8382
### Step 1: Begin C4B Setup
8483

@@ -90,39 +89,18 @@ Below are the minimum requirements for setting up your C4B server via this guide
9089
Set-ExecutionPolicy Bypass -Scope Process -Force
9190
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::tls12
9291
Invoke-RestMethod https://ch0.co/qsg-go | Invoke-Expression
93-
Set-Location "$env:SystemDrive\choco-setup\files"
94-
.\Initialize-C4bSetup.ps1
9592
```
9693
97-
> <details>
98-
> <summary><strong>What does this script do? (click to expand)</strong></summary>
99-
> <ul class="list-style-type-disc">
100-
> <li>Installs Chocolatey client from https://community.chocolatey.org</li>
101-
> <li>Prompts for your C4B license file location, with validation</li>
102-
> <li>Converts your C4B license into a Chocolatey package</li>
103-
> <li>Configures local "choco-setup" directories</li>
104-
> <li>Downloads setup files from "choco-quickstart-scripts" GitHub repo</li>
105-
> <li>Downloads Chocolatey packages required for setup</li>
106-
> </ul>
107-
> </details>
94+
#### Certificate Options
10895
109-
> :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.
110-
111-
#### Running with a Certificate
112-
113-
**ALTERNATIVE 1 : Custom SSL Certificate** - If you have your own custom SSL certificate (purchased/acquired, or from your Domain CA), you can paste and run the following script with the `Thumbprint` value of your SSL certificate specified:
96+
**Custom SSL Certificate** - If you have your own custom SSL certificate (purchased/acquired, or from your Domain CA), you can paste and run the following script with the `Thumbprint` value of your SSL certificate specified:
11497
11598
```powershell
11699
Set-Location "$env:SystemDrive\choco-setup\files"
117100
.\Initialize-C4bSetup.ps1 -Thumbprint '<YOUR_CUSTOM_SSL_CERT_THUMBPRINT_HERE>'
118101
```
119102

120-
> :warning:**REMINDER**: If you are using your own SSL certificate, be sure to place this certificate in the `Local Machine > Trusted People` certificate store before running the above script, and ensure that the private key is exportable.
121-
122-
> :memo: **NOTE**
123-
> A Role and User credential will be configured to limit access to your Nexus repositories. As well, CCM Client and Service Salts are configured to further encrypt your connection between CCM and your endpoint clients. These additional settings are also incorporated into your `Register-C4bEndpoint.ps1` script for onboarding endpoints.
124-
125-
**ALTERNATIVE 2 : Wildcard SSL Certificate** - If you have a wildcard certificate, you will also need to provide a DNS name you wish to use for that certificate:
103+
**Wildcard SSL Certificate** - If you have a wildcard certificate, you will also need to provide a DNS name you wish to use for that certificate:
126104

127105
```powershell
128106
Set-Location "$env:SystemDrive\choco-setup\files"
@@ -136,6 +114,30 @@ Set-Location "$env:SystemDrive\choco-setup\files"
136114
.\Initialize-C4bSetup.ps1 -Thumbprint deee9b2fabb24bdaae71d82286e08de1 -CertificateDnsName chocolatey.foo.org
137115
```
138116

117+
> :warning:**REMINDER**: If you are using your own SSL certificate, be sure to place this certificate in the `Local Machine > Trusted People` certificate store before running the above script, and ensure that the private key is exportable.
118+
119+
> :memo: **NOTE**
120+
> A Role and User credential will be configured to limit access to your Nexus repositories. As well, CCM Client and Service Salts are configured to further encrypt your connection between CCM and your endpoint clients. These additional settings are also incorporated into your `Register-C4bEndpoint.ps1` script for onboarding endpoints.
121+
122+
**Self-Signed Certificate** - If you are running a bare-minimum proof of concept environment, you can generate a self-signed certificate and use that.
123+
124+
```powershell
125+
Set-Location "$env:SystemDrive\choco-setup\files"
126+
.\Initialize-C4bSetup.ps1
127+
```
128+
129+
> <details>
130+
> <summary><strong>What does this script do? (click to expand)</strong></summary>
131+
> <ul class="list-style-type-disc">
132+
> <li>Installs Chocolatey client from https://community.chocolatey.org</li>
133+
> <li>Prompts for your C4B license file location, with validation</li>
134+
> <li>Converts your C4B license into a Chocolatey package</li>
135+
> <li>Configures local "choco-setup" directories</li>
136+
> <li>Downloads setup files from "choco-quickstart-scripts" GitHub repo</li>
137+
> <li>Downloads Chocolatey packages required for setup</li>
138+
> </ul>
139+
> </details>
140+
139141
#### Script: Nexus Setup
140142

141143
As part of the C4B setup, we install and configure Sonatype Nexus Repository, which is used for hosting your Chocolatey packages internally:
@@ -198,23 +200,6 @@ As part of the C4B setup, we create a readme and install the Chocolatey Agent on
198200
199201
> :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.
200202
201-
### Script: Verification
202-
203-
As a part of the C4B setup, we run tests to validate that your environment is correctly configured:
204-
205-
> <details>
206-
> <summary><strong>What does this script do? (click to expand)</strong></summary>
207-
> <ul class="list-style-type-disc">
208-
> <li>Verifies Nexus Repository installation</li>
209-
> <li>Verifies Central Management installation</li>
210-
> <li>Verifies Jenkins installation</li>
211-
> <li>Ensures system firewall is configured</li>
212-
> <li>Ensures Windows Features are installed</li>
213-
> <li>Ensures services are correctly configured</li>
214-
> <li>Ensured README is created</li>
215-
> </ul>
216-
> </details>
217-
218203
### Step 2: Setting up Endpoints
219204

220205
1. Find the `Register-C4bEndpoint.ps1` script in the `C:\choco-setup\files\scripts\` directory on your C4B Server. Copy this script to your client endpoint.

0 commit comments

Comments
 (0)