This is an old revision of the document!
This guide will walk you through installing `
rct-service`
from source on a fresh installation of Windows Server 2016 and above.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $cli = New-Object "System.Net.WebClient" $cli.DownloadFile("https://cloudbase.it/downloads/app/hyper-v/rct-service.zip", "$env:USERPROFILE\rct-service.zip")
Extract files:
Expand-Archive $env:USERPROFILE\rct-service.zip -DestinationPath $env:USERPROFILE\rct
The RCT service requires some x509 certificates. All traffic is over HTTPS. You may use whichever method you want to generate them.
For your convenience, the gen-certs.exe application can generate a proper CA and server/client certificates in one go. The pre-compiled binary can be downloaded from here
$cli.DownloadFile("http://wiki.cloudbase.it/_media/gen-certs.zip", "$env:USERPROFILE\gen-certs.zip") Expand-Archive "$env:USERPROFILE\gen-certs.zip" -DestinationPath "$env:USERPROFILE\rct"
& "$env:USERPROFILE\rct\gen-certs.exe" -certificate-hosts "127.0.0.1,localhost" -output-dir "$env:USERPROFILE\rct"
You should now have a bunch of certificates in `
$env:USERPROFILE\rct`
Rocket looks for it's config in the current working directory. If none is found, it will go one level up and look there. It will keep doing this until it reaches the filesystem root.
We will be writing the config in the root of the filesystem. Because I am lazy, and I have no idea what the CWD is for a windows service.
Expand the full path to the certificates:
ls $env:USERPROFILE\rct
In my case it's `
C:\Users\Administrator\rct`
.
$config = @" [global] # Use something else auth_key = "swordfish" address = "0.0.0.0" port = 6677 [global.tls] certs = "C:/Users/Administrator/rct/srv-pub.pem" key = "C:/Users/Administrator/rct/srv-key.pem" "@ Set-Content C:\Rocket.toml $config
:!: Notice we are using forward slashes in the config :!:
:!: Depending on your client, you may need to concatenate the `
ca-pub.pemwith
srv-pub.pem`
:!:
New-Service -Name rct-service ` "C:\Users\Administrator\rct\OpenStackService.exe rct-service C:\Users\Administrator\rct\rct-service.exe" ` -DisplayName rct-service -StartupType Automatic
Start-Service rct-service