Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

.net core Plastic SCM Server on Windows Server Core

Monday, July 06, 2020 Ma Nu , 0 Comments

Let us share how to create a minimalist Microsoft Windows installation to host our new .net Core Plastic SCM Server. Didn't you know we run on .net core? Check this blogpost.

What is Windows Server Core?

Windows Server Core is a minimal installation option that is available when you are deploying a regular Windows Server. It includes most but not all server roles, which makes the disk footprint around 3-5GB.

With Server Core, Microsoft stripped away the graphical user interface, so you must run all the operations using the command line. Not a problem for a server-side environment.

You can always install Windows Core Server in your office using a small machine, but as it requires a small number of resources, it is perfect for hosting it at Amazon.

Amazon instance creation

First, create a new instance selecting this Amazon AMI, or anyone else more modern:

The installation footprint is tiny. In my case, it takes less than 5GB. Notice a regular windows server weighs, at least, double.

It only brings a command line window with PowerShell, of course, so let’s use it to install everything we need.

To access the machine from the outside we need SSH, RDP does not work here. My installation brings the Client, but we need the Server component:

> Get-WindowsCapability -Online | ? Name -like `OpenSSH*'
Name : OpenSSH.Client~~~~
State : Installed
Name : OpenSSH.Server~~~~
State : NotPresent

Run the following command to install the Open SSH Server:

> Add-WindowsCapability -Online -Name OpenSSH.Server~~~~
Path :
Online : True
RestartNeeded : False

SSH default port is 22, so add a new firewall rule to allow the traffic through that port:

>firewall add rule name="Open Port 22" dir=in action=allow protocol=TCP localport=22

Now, start the SSH server:

Start-Service sshd

And voila, we can access from our computer to the new Window Server core machine:

PS C:\Users\manu> ssh Administrator@ec2-3-8-208-151.eu-west-2.compute.amazonaws.com
The authenticity of host 'ec2-3-8-208-151.eu-west-2.compute.amazonaws.com (' can't be established.
ECDSA key fingerprint is SHA256:d5EePSplh6S+mDBaoCcyW4lyepBli8RXUlIcZzSsB6I.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-3-8-208-151.eu-west-2.compute.amazonaws.com,' (ECDSA) to the list of known hosts.
Administrator@ec2-3-8-208-151.eu-west-2.compute.amazonaws.com's password:
Microsoft Windows [Version 10.0.18363.778]
(c) 2019 Microsoft Corporation. All rights reserved.
administrator@EC2AMAZ-IR0S49V C:\Users\Administrator>

Plastic SCM .net core Server installation

Everything is really to get the Plastic SCM .net core Server bundle inside the machine. You can always get it from our website. Hey! Remember to disable the Invoke-WebRequest command progress; otherwise, it is super-slow!

$progresspreference = 'silentlyContinue'
Invoke-WebRequest https://s3.eu-west-2.amazonaws.com/plastic-releases/releases/ -OutFile .\server-netcore.zip
$progressPreference = 'Continue'

Unzip the bundle:

PS C:\Users\Administrator>Expand-Archive server-netcore.zip -DestinationPath c:\PlasticSCM\server-net-core

Add another firewall rule for the Plastic SCM Server port. Note: If this Plastic SCM Server is outside of your office, make sure you only use the SSL port.

PS c:\PlasticSCM\server-net-core> netsh advfirewall firewall add rule name="Open Port 8787" dir=in action=allow protocol=TCP localport=8787

It's always good to test if the Plastic SCM Server can start before going further. You can do it by running the server console mode. The Plastic SCM Server has two ways to start, console, and daemon/service. A Plastic SCM Server in console mode lives until the console where it runs keeps open, or until you type enter key twice.

PS C:\plastic\server-net-core> .\plasticd.exe --console
plasticd daemon up. 578 ms startup time
Hosting environment: Production
Content root path: C:\plastic\server-net-core\webadmin
Now listening on: http://[::]:7878

From my local machine, I verify I can list the server default repository:

PS C:\wkspaces\codice> cm repository list ec2-3-8-208-151.eu-west-2.compute.amazonaws.com:8787

Everything seems to be working fine, so type the enter key twice at the server console, and you will see how the Plastic SCM server stops. Now, let's create a Windows Service to launch it properly:

sc.exe create plasticscm-net-core-server binpath=C:\plastic\server-net-core\plasticd.exe

Now, you should have a .net core Plastic SCM server running on a Windows Server core machine Enjoy it! 😊

Next steps

Try to do the same with the new "Nano" Windows Server. It seems to be several times smaller!

Manuel Lucio
I'm in charge of the Customer Support area.
I deal with complex setups, policies and working methodologies on a daily basis.
Prior to taking full responsibility of support, I worked as software engineer. I have been in charge of load testing for quite some time, so if you want to know how well Plastic compares to SVN or P4 under a really heavy load, I'm your guy.
I like to play with Arduino GPS devices, mountain biking and playing tennis.
You can find me hooked to my iPhone, skate-boarding or learning Korean... and also here @mrcatacroquer.

0 comentarios: