Registering infrastructure resources
For IBM Hybrid Cloud Mesh (Mesh) to connect your applications, it requires knowledge about the cloud and on-prem infrastructure where the applications are running.
You can inform Mesh about your infrastructure in two ways:
- Provide a limited read-only set of credentials to your infrastructure so Mesh can autodiscover your infrastructure. See Discovering cloud infrastructure for instructions.
- Manually register the relevant parts (resources) of your infrastructure with Mesh. See the following procedure.
Prerequisites
For more information, see Installing and configuring the CLI.
Overview
Your infrastructure resources have a hierarchy, and it is necessary to register the resources in order, from the broadest to the most specific:
- cloud
- location
- vpc (virtual private cloud)
- securitygroup
- cluster
- namespace
- node (virtual machine or bare metal)
Deployment environment is the abstract term Mesh uses for Virtual Private Cloud (VPCs), clusters, and nodes. The abstract term for security groups and namespaces is partition. The primary purpose of registering your infrastructure is to describe the deployment environments and partitions where your applications run.
Registering clouds
Register each cloud that contains applications you want Mesh to connect. For example:
cat << EOM | palmctl create cloud -f -
name: AWS
type: AWS
is_private: false
EOM
- The value of the
name
field can be anything, as long as it is unique. - The valid values for
type
are:IBM
,AWS
,GCP
, andAzure
. - To represent all of your on-prem data centers:
- Set
type
toother
- Set
is_private
totrue
- Set
Registering cloud locations
Register each location within each cloud that
contains your applications. Registering a location is easier if it is one of the known public cloud
locations. First, list the public cloud locations by running palmctl get
cloudlocations
and note the code
field of the cloud location that
corresponds to your location. Then, use that code in the cloud_location_code
field
when registering your location.
Example of registering a location associated with an existing public cloud location:
cat << EOM | palmctl create location --cloud-name AWS -f -
name: AWS-east
cloud_location_code: abcdef
is_multi_zone: true
EOM
When registering a location that is not associated with an existing public cloud location (usually an on-prem data center), specify additional fields.
Example of registering a location that is not associated with an existing public cloud location:
cat << EOM | palmctl create location --cloud-name OnPrem -f -
name: Factory-CA
type: region
is_multi_zone: false
city: Los Angeles
region: California
country: United States
geo_coordinates: -118.4068,34.1139
EOM
- The valid values for the
type
field aresite
,region
,zone
. - The coordinates in the
geo_coordinates
field are expressed as longitude, then latitude.
Registering VPCs
Register each VPC that contains your applications. A VPC
can be a deployment environment itself (for example, has applications on virtual machines (VMs) in
the VPC) or just a container for Kubernetes clusters. In both cases, it should be registered. Use
the infra_only
field to distinguish between the two cases. For
example:
cat << EOM | palmctl create securitygroup --cloud-name AWS --vpc-name 'myvpc' -f -
name: security group 1
EOM
Registering Kubernetes clusters
Register each cluster that is running your
applications. If api_end_point
, credentials_key
, and
auto_discover: true
are specified, then Mesh will
automatically discover the namespaces and applications running in the cluster. For
example:
cat << EOM | palmctl create cluster --cloud-name AWS -f -
name: myEKS
location_id: <resource_id from previous command>
type: EKS
is_multi_zone: true
api_end_point: https://mycloud.com/cluster1
credentials_key: /path/to/key/in/SM
auto_discover: true
EOM
Registering cluster namespaces
If you did not configure autodiscovery when registering the clusters, register each namespace in them that is running your applications. For example:
cat << EOM | palmctl create namespace --cloud-name AWS --cluster-name myEKS -f -
name: namespace 1
EOM
Registering nodes
For VMs that are running your applications and are outside of a VPC, register a node resource for it. For example:
cat << EOM | palmctl create node --cloud-name AWS -f -
name: myVM
location_id: <resource_id from previous command>
type: VM
EOM
Accessing help for palmctl commands
Use the following commands to get help information when you view, modify, or delete your infrastructure resources:
palmctl get -h
palmctl update -h
palmctl delete -h