Deploying Metalsoft

To deploy MetalSoft two components must be installed and configured:

  1. The controller (that offers the Admin and the User interfaces as well as the API). It is a Kubernetes based “application”.
  2. The agent (that handles the actual interactions with hardware). It is a Docker compose based “application”.

The agents control the actual hardware and connect back to the controller. ../_images/deploying_metalsoft_02.png

While the deployment itself is relatively straightforward, the configurations vary from environment to environment. The following is just an example configuration using an eVPN fabric and Juniper switches.

Installing the MetalSoft controller

Follow this guide to install the controller in a kubernetes cluster.

Create the datacenter MASTER record in MetalSoft

A master datacenter is not really a datacenter but the root in the hierarchical topology of datacenters. It stores some of the information used by the environment such as the master repository. In the future this record will be created automatically.

Create a file dc-master.yaml with the following contents:

BSIMachinesSubnetIPv4CIDR: 176.223.248.23/32
BSIVRRPListenIPv4: 176.223.248.23
BSIMachineListenIPv4List:
    - 176.223.248.23
BSIExternallyVisibleIPv4: 176.223.248.23
repoURLRoot: http://repo.metalsoft-prod.dell.local
repoURLRootQuarantineNetwork: http://repo.metalsoft-prod.dell.local
SANRoutedSubnet: 100.96.0.0/16
NTPServers:
    - 172.98.193.44
    - 72.14.183.39
DNSServers:
    - 1.1.1.1
    - 8.8.8.8
TFTPServerWANVRRPListenIPv4: 176.223.248.23
dataLakeEnabled: false
serverRegisterUsingGeneratedIPMICredentialsEnabled: false
serverRegisterUsingProvidedIPMICredentialsEnabled: false
switchProvisioner:
    type: LANProvisioner
enableTenantAccessToIPMI: false
allowVLANOverrides: false
allowNetworkProfiles: false
enableServerRegistrationStartedByInBandDHCP: true
extraInternalIPsPerSubnet: 0
extraInternalIPsPerSANSubnet: 0
serverRAIDConfigurationEnabled: false
webProxy: null
isKubernetesDeployment: true
allowInstanceArrayFirmwarePolicies: false
provisionUsingTheQuarantineNetwork: false
enableDHCPRelaySecurityForQuarantineNetwork: false
enableDHCPRelaySecurityForClientNetworks: false
enableDHCPBMCMACAddressWhitelist: false
dhcpBMCMACAddressWhitelist: []
defaultServerCleanupPolicyID: 0
defaultDeploymentMechanism: virtual_media
defaultCleanupAndRegistrationMechanism: bmc
flags: 'MASTER HIDDEN '
label: master
owner: ""
parent: ""
metalcloud-cli datacenter create --config dc-master.yaml --format yaml --id master --title "Master DC" --master --hidden --return-id

Create a MetalSoft datacenter for a datacenter. Create a file test-datacenter.yaml with the following contents:

BSIMachinesSubnetIPv4CIDR: 10.73.252.0/24
  BSIVRRPListenIPv4: 10.73.252.10
  BSIMachineListenIPv4List:
      - 10.73.252.10
  BSIExternallyVisibleIPv4: 1.43.59.1
  repoURLRoot: http://repo.metalsoft.io
  repoURLRootQuarantineNetwork: http://repo.metalsoft.io
  SANRoutedSubnet: 100.96.0.0/16
  NTPServers:
      - 45.55.58.103
  DNSServers:
      - 1.1.1.1
      - 8.8.8.8
  TFTPServerWANVRRPListenIPv4: 10.73.252.10
  dataLakeEnabled: false
  latitude: 3.01675033569336
  longitude: -7.48258209228516
  address: test, test, USA
  serverRegisterUsingGeneratedIPMICredentialsEnabled: false
  serverRegisterUsingProvidedIPMICredentialsEnabled: true
  switchProvisioner:
      LAGRanges:
          - 5-25
      LANVLANRange: 200-299
      MLAGRanges:
          - 26-27
      SANVLANRange: 300-399
      WANVLANRange: 100-199
      allocateDefaultLANVLAN: false
      allocateDefaultSANVLAN: false
      allocateDefaultWANVLAN: true
      preventCleanupForVLANs:
          - 301
          - 1602
      preventCleanupForVLANsFromExternalConnectionUplinks:
          - 301
          - 1602
      preventUsageOfVLANs:
          - 301
          - 1602
      quarantineVLANID: 5
      storageHasSeparateFabric: false
      type: EVPNVXLANL2Provisioner
  enableTenantAccessToIPMI: false
  allowVLANOverrides: true
  allowNetworkProfiles: true
  enableServerRegistrationStartedByInBandDHCP: true
  extraInternalIPsPerSubnet: 0
  extraInternalIPsPerSANSubnet: 0
  serverRAIDConfigurationEnabled: false
  webProxy:
      ip: 10.73.252.10
      port: 3128
  isKubernetesDeployment: false
  allowInstanceArrayFirmwarePolicies: false
  provisionUsingTheQuarantineNetwork: true
  enableDHCPRelaySecurityForQuarantineNetwork: false
  enableDHCPRelaySecurityForClientNetworks: false
  enableDHCPBMCMACAddressWhitelist: false
  dhcpBMCMACAddressWhitelist: []
  defaultServerCleanupPolicyID: 0
  defaultDeploymentMechanism: virtual_media
  defaultCleanupAndRegistrationMechanism: bmc
flags: ""
label: test-datacenter
owner: ""
parent: ""
title: Test Datacenter

Create the record using the CLI:

$ metalcloud-cli datacenter create --config test-datacenter.yaml --format yaml --id uk-london --title 'test, USA 01'

$ metalcloud-cli datacenter get --id uk-london --show-config --format yaml

DATACENTER OVERVIEW
-------------------
Datacenter name (label): uk-london
Datacenter display name (title): London, UK
User: 
Flags: 
Parent: 
Type: metal_cloud
Created: 2020-07-31T20:03:55Z
Updated: 2020-08-07T12:11:12Z

Consult Adding a New Datacenter for more details on available options.

Register (enroll) a switch

Create a configuration file leaf_switch.yaml:

identifierString: iad1-bm-sw-01
datacenterName: test-datacenter
provisionerType: evpnvxlanl2
provisionerPosition: leaf
driver: junos18
managementUsername: metalsoft
managementAddress: 10.72.0.61
managementPort: 22
managementProtocol: ssh
managementMACAddress: "00:00:00:00:00:00"
primaryWANIPv4SubnetPool: 192.168.253.0
primaryWANIPv4SubnetPrefixSize: 24
primaryWANIPv6SubnetPoolID: 3
primaryWANIPv6SubnetCIDR: fd9f:1a77:a3a0:0000:0000:0000:0000:0000/48
primarySANSubnetPool: 100.64.0.1
primarySANSubnetPrefixSize: 21
quarantineSubnetStart: 10.73.254.0
quarantineSubnetEnd: 10.73.254.63
quarantineSubnetPrefixSize: 26
quarantineSubnetGateway: 10.73.254.2
requiresOSInstall: false
isBorderDevice: true
isStorageSwitch: false
networkTypesAllowed:
- wan
- lan
- quarantine

Register the new switch by running:

$ metalcloud-cli switch create --raw-config leaf_switch.yaml --format yaml

Create a WAN subnet pool

From this subnet pool, infrastructures get allocated entire prefixes that get routed to the infrastructure and from which IPs get allocated on server interfaces designated as WAN interfaces.

Create a file containing:

datacenter: test-datacenter
prefix: 10.1.8.1
netmask: 255.255.255.224
size: 27
type: ipv4
routable: true
destination: WAN
manualAllocationOnly: false

Create the subnet:

$ metalcloud-cli subnet-pool create --config examples/subnet.yaml --format yaml --return-id 

Install the Datacenter Agents on the DC agents machine

Follow this guide to setup the agent.

Register (enroll) servers

Follow Adding a New Server for all your servers.

The Servers page should now show several servers registered and available for consumtion: ../_images/servers_page_servers_available.png

Test a server provisioning

$ metalcloud-cli infrastructure create --label test
$ metalcloud-cli instance-array create --boot pxe_iscsi --server-type M8.32v1 --drive-array-template centos7-7 --infra test --label test
$ metalcloud-cli infrastructure deploy --id test --autoconfirm
$ metalcloud-cli infrastructure get --id test
Infrastructure test (198) - datacenter uk-london owner [email protected]
+-------+----------------+----------------+------------------------------------------------------------------------+---------+
| ID    | OBJECT_TYPE    | LABEL          | DETAILS                                                                | STATUS  |
+-------+----------------+----------------+------------------------------------------------------------------------+---------+
| 358   | InstanceArray  | test           | 1 instances (1 RAM, 1 cores, 0 disks pxe_iscsi )                       | active  |
| 46    | DriveArray     | drive-array-46 | 1 drives - 40.0 GB iscsi_hdd CentOS 7.7 [#11] attached to: test [#358] | ordered |
+-------+----------------+----------------+------------------------------------------------------------------------+---------+
Total: 2 elements

Wait until deployment is complete. You now have a fully functional MetalSoft deployment!