Configuring pre-provisioned infrastructure
Create a Hadean cluster and run an application on existing virtual or physical machines, on-cloud or on-premises.
Starting in release 1.8, Hadean Platform allows clusters to be created on pre-provisioned virtual or physical machines in your cloud, hybrid, or on-premises environment. The Platform CLI will automatically deploy the Hadean software and your application payload in the same way as it would to a managed Azure or AWS cluster, and revert the target machines to their original state at cluster destruction. Unlike managed Azure or AWS clusters, destroying the cluster will not destroy any virtual infrastructure in your cloud environment; Hadean Platform does not distinguish between cloud VMs, on-prem VMs, or physical hardware when deployed to extant infrastructure. Customers are therefore able to deploy applications to any cloud provider or on-premises hardware subject to the system requirements listed in the section below.
Configuration and management of the cluster must take place from a single administrative workstation or VM with the Hadean SDK installed.
If you have followed the steps in the previous section and intend to use Hadean Platform to create and manage your AWS or Azure resources, you can ignore this section and move on to Deploying an application.
A cluster consists of one gateway machine and one or more worker machines that will actually execute your application. Each machine to be delegated to the cluster requires:
- 1.The operating system must be Ubuntu 20.04 LTS (Focal Fossa).
- 2.A user account with password-less
sudo
capability. - 3.SSH keys for the above user need to be available on the workstation/VM used to provision and administer the cluster.
- 4.Connectivity:
- 1.TCP port 22 open between all machines in the cluster as well as the admin workstation.
- 2.TCP port 443 and ports 37620 - 37650 open on the gateway machine to the admin workstation.
- 3.TCP port 443 outbound from the gateway machine to portal.hadean.com
The user account with sudo capability (item 2) can be distinct for each machine if required. It can also be removed or disabled after the cluster has been created.
Hadean Platform needs to know the IP addresses and SSH key(s) of the remote machines. This information is specified in a toml configuration file. An example configuration is listed below.
Note that the "muxer" label can only be applied to the last machine(s) in the list.
1
# Simple example of a self-managed cluster creation config.
2
# Copy and amend this file to suit your individual requirements.
3
4
# A unique, descriptive name for your cluster.
5
name = "my-static-cluster"
6
7
# Cloud provider is always an empty string for self-managed clusters,
8
# even if deploying to a Hadean-supported cloud provider.
9
cloud_provider = ""
10
11
# Credentials for all machines specified below. Individual machines can have
12
# separate credentials set, which will override this option.
13
[machines.credentials]
14
user = "clusteruser"
15
# Specify the path to the SSH private key, permissions 600 required
16
sshkey_path = "/home/me/id_rsa"
17
18
# List of four static, extant machines.
19
[[machines.imported]]
20
# One (and only one) machine *MUST* be labelled as "gateway" as this denotes the
21
# machine that will be configured as the gateway. Other machines can be labelled
22
# according to your preferences (or omitted).
23
labels = ["gateway"]
24
ip = "10.26.0.10"
25
26
# Second machine
27
[[machines.imported]]
28
labels = ["worker0"] # Labels applied to this machine (optional)
29
ip = "10.26.0.11" # IP address
30
31
# Third machine
32
[[machines.imported]]
33
labels = ["worker1"] # Labels applied to this machine (optional)
34
ip = "10.26.0.12" # IP address
35
36
# Fourth machine
37
# One or more machines should be labelled as "muxer" to determine which host to
38
# install Connect/Muxer. These need to appear last in the list of machines.
39
[[machines.imported]]
40
labels = ["muxer"] # Labels applied to this machine (optional)
41
ip = "10.26.0.13" # IP address
42
43
# If one or more machines require distinct credentials, they can be specified here
44
# and will override those set in [machines.credentials]
45
user = "special"
46
sshkey_path = "/home/me/secure/special/id_rsa"
Once you have configured your infrastructure and created your configuration file, the next step is to create the cluster and deploy your application to it. This is covered in the next section.