This is a small demostrantion on how to execute ISHBootstrap on a clean windows server using the embeded example structure. Please read How to use the repository (Examples)
The instructions are tested against a Windows Server 2016 Evaluation.
This repository showcases:
- How an obfuscated JSON file looks like.
- What is the correct sequence.
Before you start:
- A web server certificate must be available on the target host. To issue and push a certificate from the domain controller please consult Bootstrap VM with certificates issued by your active directory certificate authority.
- PowerShell v5 is required on the target host.
Remarks to consider:
- The ISHBootstrap.json has stripped out all properties relative to remoting.
- The ISHBootstrap.json is obfuscated to share this repository.
- ISHBootstrap.ps1 has three execution modes
- Prompt for credentials to ask for the credential of the
osuser
and ftp. Don't modify theOSUserCredentialExpression
andFTP.CredentialExpression
in ISHBootstrap.json. - No credentials and the
OSUserCredentialExpression
andFTP.CredentialExpression
in ISHBootstrap.json must implement this aspect. - Credentials as parameters. Don't modify the
OSUserCredentialExpression
andFTP.CredentialExpression
in ISHBootstrap.json.
- Prompt for credentials to ask for the credential of the
- ISHBootstrap.ps1 will access your adjusted
ISHBootstrap.json
from the following possible locations:- Next to the script itself.
- From a file path.
- From an http url. In this case, ISHDeploy configuration scripts must be limited to the ones in ISHBootstrap repository.
- A restart is advised at the end but depending on the operating system it might not be necessary.
- Will not do Oracle to avoid the necessary restart.
On the target server:
- In the same folder
- Place ISHBootstrap.ps1 on a the server.
- Place an
ISHBootstrap.json
next to the script. - Launch a console with administrator priviledges.
- Change directory into the folder.
- Execute one of the following.
# target master branch
powershell -File ISHBootstrap.ps1
# target develop branch
powershell -File ISHBootstrap.ps1 -Branch develop
# target v0.7 tag
powershell -File ISHBootstrap.ps1 -Tag "v0.7"
# Specify source for ISHBootstrap.json
$jsonPath=""
# Download ISHBootstrap.ps1
$scriptUrl="https://raw.githubusercontent.com/Sarafian/ISHBootstrapDemo/master/ISHBootstrap.ps1"
$scriptPath=Join-Path $env:TEMP "ISHBootstrap.ps1"
Remove-Item -Path $scriptPath -Force -ErrorAction SilentlyContinue
Invoke-WebRequest -Uri $scriptUrl -UseBasicParsing -OutFile $scriptPath
# Change the parameter do match your use case
& $scriptPath -JSONPath $jsonPath -PromptCredential
Its a script to help copy ISHBootstrap.ps1 on the remote host for debugging purposes.