Bootstrap Modules
bootstrap-common
Definitions
certbot.json- Install Certbot
- Certificate files
pfxkeystore{dataDir}/{serverDomain}.pfx
pem- Linux
/etc/letsencrypt/live/{serverDomain}/fullchain.pem/privkey.pem - Windows
C:/Certbot/live/{serverDomain}/fullchain.pem/privkey.pem
- Linux
- Certificate files
- OS support
- Linux
- Windows
- Properties
certEmail- email used by Let’s Encrypt for important account notificationskeystorePw- password used forPFXfileserverDomain- Eg.dev.rswk.ch
- Install Certbot
dev.json- Install platform development tools
- OS support
- Linux
- Windows
- Properties
nexusDomain- Eg.dev.rswk.chnexusPasswordnexusProtocol- Eg.httpsnexusUser
engine-*.json- Definitions for managing
meta-enginebased servers - Flags
engine-server.jsoncertbot- Install certbot and certificate forserverDomain
engine-server-update.jsonengineUpdate- Run update tasks, seeupdateTasksproperty
- OS support
- Linux
- Windows
- Properties
- General
serviceName- Name of engine service
engine-import.jsonimportFixture- Name of file to import, eg.fixturewill import{moduleDir}/config/engine/fixture.json
engine-main.jsonjavaArgs- Additional java executable arguments, eg.-Djavax.net.ssl.trustStore="{trustStoreFile}"mainArgs- Main arguments, eg.-update cloneserviceClassPathserviceConfigserviceConfigClassserviceLauncherClass
engine-server-update.jsonupdateTasks- Update tasks to run, eg.clone
- General
- Definitions for managing
firewall.json- Basic firewall rules
- Linux
ufw - Windows
Windows Defender Firewall
- Linux
- OS support
- Linux
- Windows
- Ports
- HTTP 80/TCP
- HTTPS 443/TCP
- RDP 3389/TCP (Windows only)
- SSH 22/TCP (Linux only)
- Basic firewall rules
httpd.json- Install HTTPD
- Linux
apache2package - Windows Apache Lounge
- Linux
- Configs
{moduleDir}/config/httpd-vhosts.conf{moduleDir}/config/httpd.conf
- OS support
- Linux
- Windows
- Properties
serverAdmin- ServerAdminserverDomain- Eg.dev.rswk.ch
- Install HTTPD
java.json- Install Azul Zulu Java 17
- Flags
jdk- Install JDK 17
- OS support
- Linux
- Windows
nssm.json- Install NSSM
- OS support
- Windows
ntp.json- Enable NTP using
europe.pool.ntp.org - OS support
- Linux
- Windows
- Enable NTP using
openssl.json- Install OpenSSL
- Linux
opensslpackage - Windows Shining Light Productions Win64 OpenSSL
- Linux
- OS support
- Linux
- Windows
- Install OpenSSL
sqlite.json- Download
xerial/sqlite-jdbcJAR.- Includes native SQLite libraries for various platforms
- Manually include JAR in
serviceClassPathto have SQLite inmeta-engine
- OS support
- Linux
- Windows
- Download
utils.json- Install various server utilities
- 7zip
- Linux
p7zip-fullpackage - Windows 7-Zip
- Linux
- Chromium
- KLOGG
- Visual Studio Code
- Windows
- 7zip
- OS support
- Linux
- Windows
- Install various server utilities
bootstrap-dev-server
Development server for organizations using platform with Fossil,
Jenkins and Nexus.
Definitions
dev-server.json- Install development server
- Flags
certbot
- OS support
- Linux
- Properties
httpdCertFile- SSLCertificateFilehttpdKeyFile- SSLCertificateKeyFile
dev-server-after.json- Empty by default. Override to run any organization specific actions after server is installed
Manual steps dev-server
- Setup Fossil SCM server
- Copy fossil repository files from previous development server to
/var/lib/platform/data/fossil. This does not work with files from local developer environment! - Create new repository files
fossil init mycompany.fossil -A adminfossil init mycompany-bootstrap.fossil -A admin- Password for
adminuser is printed to console - Open
https://dev.mycompany.ch/fossil/mycompany(repeat formycompany-bootstrap)- Login with
adminuser - See the
Adminsection for all available settings- Change password to be same on all repositories (or adapt Jenkins credentials)
- Add additional users
for your organization
- Setup login group across multiple repositories
- Change access settings as needed and see security audit for capability summary
- Login with
- Copy fossil repository files from previous development server to
- Setup Jenkins build server
- See
boostrap.logfor Jenkins admin password - Open
https://dev.mycompany.ch/jenkins - Install suggested plugins
- Finish setup with
adminuser or create a different user - Manage Jenkins
- Manage plugins
- Available
- Lockable Resource
- Maven Integration
- Install and restart
- Available
- Configure System
- Lockable Resources Manager > Add Lockable Resource
- Name
Xvfb
- Name
- Lockable Resources Manager > Add Lockable Resource
- Global Tool Configuration
- JDK
- Name
jdk17 - Disable
Install automatically - JAVA_HOME
/var/lib/platform/tool/jdk17
- Name
- Maven
- Name
default - Disable
Install automatically - MAVEN_HOME
/var/lib/platform/tool/maven
- Name
- JDK
- Manage Credentials > Jenkins > Global credentials
- Add Credentials
- Secret text
- ID
npm_authTokenfor your NPM repository
- ID
- Username with password
- ID
scmadminuser and the password for your Fossil repositories
- ID
scm-platformplatformuser andplatformpassword
- ID
- Secret text
- Add any other credentials you need stored in Jenkins
- Add Credentials
- Manage plugins
- To import existing job configurations
- Create directory named after the job in Jenkins home directory
/var/lib/platform/data/jenkins/jobs
- Copy job config as
config.xmlinto directory - Manage Jenkins > Reload Configuration from Disk
- Create directory named after the job in Jenkins home directory
- See
- Setup Nexus software repository
- Open
https://dev.mycompany.ch/nexus - Login with
admin- See
boostrap.logfor Nexus admin password
- See
- Follow setup wizard
- Set password to
nexusPasswordproperty used inboostrap.json - Disable anonymous access
- Set password to
- Server configuration
- Repository
- Cleanup Policies
- Create Cleanup Policy
- Name
Maven_150 - Format
maven2 - Component usage
150
- Name
- Create Cleanup Policy
- Name
Maven_14 - Format
maven2 - Component usage
14
- Name
- Create Cleanup Policy
- Name
NPM_150 - Format
npm - Component usage
150
- Name
- Create Cleanup Policy
- Repositories
- Add
Maven_150tomaven-central,maven-releasesrepositories - Add
Maven_14tomaven-snapshotsrepository - Create repository
maven2 (hosted)bootstrap- Version policy
Mixed - Deployment policy
Allow redeploy - Add cleanup policy
Maven_150
- Version policy
thirdpartywith release policy- Version policy
Release
- Version policy
maven2 (proxy)google- Remote storage
https://maven.google.com/ - Add cleanup policy
Maven_150
- Remote storage
platform-maven-releases- Remote storage
https://dev.rswk.ch/nexus/repository/maven-releases/ - Add cleanup policy
Maven_150
- Remote storage
platform-maven-snapshots- Remote storage
https://dev.rswk.ch/nexus/repository/maven-snapshots/ - Version policy
Snapshot - Add cleanup policy
Maven_14
- Remote storage
platform-maven-thirdparty- Note: Needed for the patched
ch.rswk.daggerdependencies - Remote storage
https://dev.rswk.ch/nexus/repository/thirdparty/ - Add cleanup policy
Maven_150
- Note: Needed for the patched
npm (hosted)npm- Deployment policy
Allow redeploy - Add cleanup policy
NPM_150
- Deployment policy
npm (proxy)npm-registry- Remote storage
https://registry.npmjs.org - Add cleanup policy
NPM_150
- Remote storage
platform-npm- Remote storage
https://dev.rswk.ch/nexus/repository/npm/ - Add cleanup policy
NPM_150
- Remote storage
npm (group)npm-public- Member repostories
npm platform-npm npm-registry
- Member repostories
raw (hosted)mycompany-site- Content Disposition
inline - Maven site is deployed to this repository
- Content Disposition
- Select
maven-public- Group > Member repositories
maven-releases maven-snapshots thirdparty platform-thirdparty platform-releases platform-snapshots maven-central google
- Group > Member repositories
- Add
- Cleanup Policies
- Repository
- Security > Realms
- Add
npm Bearer Token RealmtoActiverealms
- Add
- System > Tasks > Create task
- Admin - Compact blob store
- Name
Compact default - Blob store
default - Task frequency
Weekly - Time to run this task
2:00 - Days to run this task
Sunday
- Open
- Restart server
Cheatsheet dev-server
- Nexus
- Backup and Restore
- npm Security
- To generate NPM token, run this in a folder without existing
.npmrcand after deleting the global.npmrcin your user profile. Afterwards, copy the generated token from global.npmrcand set the environment variablenpm login --registry=https://dev.mycompany.ch/nexus/repository/npm-public/
- To generate NPM token, run this in a folder without existing
- SCM
- To trust additional certificates on Windows, add them to
C:\tool\fossil\cacert.pem
- To trust additional certificates on Windows, add them to
bootstrap-dev-vm
Developer environment with all tools and utilities to work on platform and
applications based on it.
Definitions
dev-vm.json- Install developer environment
- OS support
- Linux
- Windows
- Properties
npmTokenscmPasswordscmUser
dev-vm-after.json- Empty by default. Override to run any actions after environment is installed
Manual steps dev-vm
- Linux
- Logout and login to activate environment variables
- Windows
- Close and reopen PowerShell/Terminal to activate environment variables
Virus & threat protectionin start menuVirus & threat protection settings>Manage SettingsExclusions>Add or remove exclusionsC:\dataC:\scmC:\tool
- Run full Maven build
platform- Linux
~/fossil/platform - Windows
C:\fossil\platform
- Linux
- Run
mvn -DskipTests
- Setup IDEA
- Linux
/var/lib/platform/tool/idea/bin/idea.sh - Windows
C:\tool\idea\bin\idea64.exe - Open
- Linux
~/fossil/platform - Windows
C:\fossil\platform
- Linux
- File > Project Structure
- Project SDK > Add SDK > JDK
- Linux
/var/lib/platform/tool/jdk17 - Windows
C:\tool\jdk17
- Linux
- Project language level >
17
- Project SDK > Add SDK > JDK
- File > Settings
- Build, Execution, Deployment
- Build Tools > Maven
- Always update snapshots
- Maven home path
- Linux
/var/lib/platform/tool/maven - Windows
C:\tool\maven
- Linux
- Importing
- Automatically download Sources, Documentation
- Compiler > Annotation Processors
- Enable annotation processing
- Build Tools > Maven
- Editor
- Color Scheme (Optional, use with IntelliJ Light theme)
- Import Scheme > IDEA color scheme
- Linux
~/fossil/platform/bootstrap/bootstrap-dev-vm/src/main/resources/bootstrap/config/colorscheme.icls - Windows
C:\fossil\platform\bootstrap\bootstrap-dev-vm\src\main\resources\bootstrap\config\colorscheme.icls
- Linux
- Import Scheme > IDEA color scheme
- Code Style > Java
- Import Scheme > IDEA code style XML
- Linux
~/fossil/platform/bootstrap/bootstrap-dev-vm/src/main/resources/bootstrap/config/codestyle.xml - Windows
C:\fossil\platform\bootstrap\bootstrap-dev-vm\src\main\resources\bootstrap\config\codestyle.xml
- Linux
- Import Scheme > IDEA code style XML
- General
- Appearance
- Show Whitespace > Leading
- Code Completion
- Show parameter name hints on completion
- Show full method signatures
- Appearance
- Inspections
- Import Profile
- Linux
~/fossil/platform/bootstrap/bootstrap-dev-vm/src/main/resources/bootstrap/config/inspection.xml - Windows
C:\fossil\platform\bootstrap\bootstrap-dev-vm\src\main\resources\bootstrap\config\inspection.xml
- Linux
- Import Profile
- Color Scheme (Optional, use with IntelliJ Light theme)
- Tools > Actions on Save
- Reformat code
- Optimize imports
- Build, Execution, Deployment
- Note that most of these settings have to be set for each repository you open!
- Linux
- Setup Klogg
- Tools > Highlighters
- Configure highlighters > Import
- Linux
~/fossil/platform/bootstrap/bootstrap-common/src/main/resources/bootstrap/config/klogg.conf - Windows
C:\fossil\platform\bootstrap\bootstrap-common\src\main\resources\bootstrap\config\klogg.conf
- Linux
- Select imported
Defaulthighlighters
- Configure highlighters > Import
- Tools > Highlighters
- Setup Visual Studio Code
- Linux
Visual Studio Codein app menu - Windows
C:\tool\vscode\Code.exe - Add SCM root to Workspace
- Linux
~/fossil/ - Windows
C:\fossil
- Linux
- Install extensions
Ctrl+Shift+X> Searchkoog1000.fossil- Fossil
- Linux
Cheatsheet dev-vm
- WiFi Hotpost for local testing with mobile devices
- Windows Settings > Network > Mobile hotspot
- Set SSID and Password and turn on
- Change adapter options > Microsoft WiFi Direct Virtual Adapter >
Properties > Internet Protocol Version 4
- IP
192.168.1.1 - DNS
192.168.1.1
- IP
- Install Simple DNS Plus
- Setup Simple DNS
- Records > New Zone > Primary Zone > Forward Zone >
rswk.ch - Right click
rswk.ch> New A-Record >localhost.platform.rswk.chwith IP192.168.1.1
- Records > New Zone > Primary Zone > Forward Zone >
- If you are running in a VM, make sure to forward the necessary ports
- Windows Settings > Network > Mobile hotspot
bootstrap-watchdog-server
meta-engine based server with meta-admin client. Acts as a central watchdog
instance for other meta-engine based servers.
Definitions
watchdog-server.json- Install server
- OS support
- Linux
- Windows
- Flags
peer
watchdog-server-copy.json- Helper to copy server binaries and web clients
watchdog-server-update.json- Update server
- OS support
- Linux
- Windows
watchdog-server-wipe.json- Uninstall server, including all data
- OS support
- Linux
- Windows
Cheatsheet
- Execute Bootstrap module
- Linux Bash with
bootstrap-myapp-server-1.0.zipin directory/var/tmp- Extract archive
sudo apt install -y unzip find /var/tmp -name 'bootstrap-*.zip' -exec unzip {} -d /var/tmp/bootstrap \; cd /var/tmp/bootstrap - Execute bootstrap script
chmod +x bootstrap.sh sudo ./bootstrap.sh
- Extract archive
- Windows PowerShell/Terminal as Admin with
bootstrap-myapp-server-1.0.zipin directoryC:/tmp- Extract archive
Set-Variable ProgressPreference SilentlyContinue Expand-Archive -LiteralPath (Get-ChildItem C:\tmp | Where-Object {$_.Name -like 'bootstrap-*.zip'}).FullName -DestinationPath C:\tmp\bootstrap cd C:\tmp\bootstrap - Set execution policy (if needed) and execute bootstrap script
Set-ExecutionPolicy Unrestricted .\bootstrap.ps1
- Extract archive
- Linux Bash with
