Understanding RONIN Tags in AWS: A Comprehensive Guide

Understanding RONIN Tags in AWS: A Comprehensive Guide

Managing cloud resources efficiently requires a robust tagging strategy. RONIN, a platform designed to simplify cloud computing for research, leverages AWS tagging extensively to provide structure, automation, and cost management capabilities. This post dives deep into how RONIN tags work, exploring the different types of tags used for EC2 machines, ParallelCluster deployments, EBS volumes, snapshots, AMIs, and custom tags for enhanced flexibility.

What are Tags?

In AWS, tags are key-value pairs that you assign to your resources. They act as metadata, helping you categorise, filter, search, and report on your resources. RONIN utilises tags to add additional context to resources beyond the standard AWS metadata.

RONIN Tags for EC2 Machines

RONIN applies a comprehensive set of tags to EC2 instances, providing detailed information about each machine. Here's a breakdown of the key tags:

Tag KeyDescriptionExample Value
NameThe user-defined name for the machine.research-vm
AWS-IDThe unique instance ID assigned by AWS.i-0abcdef1234567890
os_descA detailed description of the operating system.Ubuntu Server 20.04 LTS
osA system keyword representing the OS type (e.g., ubuntu, windows, redhat, opensuse).ubuntu
purchase_orderA project-level code linked to accounting systems like SAP for tracking project expenses.PO-12345
last_modifiedTracks who last modified the machine's state (start/stop) and their action.username:user@ronin.cloud:stopped
dnsThe prefix for the machine's DNS.research-vm
billing_codeAn organization-specific code for internal billing and cost allocation.BILLING-XYZ
created_byThe user who created the machine.username:user@ronin.cloud
image_urlThe URL of the image used for the machine's card in the RONIN interface.img/os/ubuntu.png
RPIDThe unique RONIN Project ID to which the machine belongs.RPID-123
default_unameThe default username for logging into the machine.ubuntu

Example Scenario:

A user starts a machine named "analysis-server" in RONIN. The machine uses Ubuntu 20.04 and is part of a project with the purchase order "PO-98765" and billing code "PROJECT-ABC". The following tags would be applied:

Tag KeyValue
Nameanalysis-server
AWS-IDi-0f1e2d3c4b5a69870
os_descUbuntu Server 20.04 LTS
osubuntu
purchase_orderPO-98765
last_modifiedusername:user@ronin.cloud:started
dnsanalysis-server
billing_codePROJECT-ABC
created_byusername:user@ronin.cloud
image_urlimg/os/ubuntu.png
RPIDRPID-456
default_unameubuntu

RONIN Tags for ParallelCluster Deployments

For ParallelCluster deployments, RONIN employs a combination of AWS ParallelCluster-specific tags and custom RONIN tags to manage and identify cluster components. Here's a look at the key tags:

Tag KeyDescriptionExample Value
ApplicationSystem tag identifying the cluster. Format: parallelcluster-RONIN-<RPID>-<name>parallelcluster-RONIN-RPID-123-mycluster
RPIDRONIN Project ID.RPID-123
aws:ec2launchtemplate:idLaunch template ID.lt-09ebe93e85bfcd178
aws:cloudformation:logical-idDefines the node type (MasterServer or ComputeServer).MasterServer, ComputeServer
aws:cloudformation:stack-nameStack name. Format: parallelcluster-RONIN-<RPID>-clusternameparallelcluster-RONIN-RPID-123-mycluster
os_descOperating system description.Ubuntu Server 18.04 LTS
last_modified_byTracks who last modified the cluster's state (start/stop) and their action.username:user@ronin.cloud:stopped
purchase_orderProject-level code for accounting.12345
osOS type keyword.ubuntu
ClusterNameCluster name.mycluster
aws-parallelcluster-attributesParallelCluster attributes (OS, scheduler, version).ubuntu1804, slurm, 2.6.1
aws-parallelcluster-filesystemFilesystem configuration.efs=0, multiebs=2, raid=0, fsx=0
billing_codeOrganization-specific billing code.BILLING-HPC
hpc_dnsDNS prefix for the cluster.mycluster
image_urlImage URL for the cluster card.img/os/ubuntu.png
NameName of the cluster.mycluster
aws-parallelcluster-networkingNetworking configuration.EFA=NONE
aws:ec2launchtemplate:versionLaunch template version.1
descriptionDescription of the OS.Ubuntu Server 18.04 LTS
aws:cloudformation:stack-idCloudFormation stack ID.arn:aws:cloudformation:us-east-1:123456789012:stack/mycluster/abcdefg-1234...
default_unameDefault username for the cluster.ubuntu
created_byUser who created the cluster.username:user@ronin.cloud
template_versionCloudFormation template version used for the cluster.ronin.pcluster.2.6.1.template

Example Scenario:

A user creates a ParallelCluster named "compute-cluster" under project "RPID-789". The cluster uses Ubuntu 18.04 and the Slurm scheduler. The purchase order is "67890", and the billing code is "HPC-COMPUTE". Here are some example tags that might be applied to the head node:

Tag KeyValue
Applicationparallelcluster-RONIN-RPID-789-compute-cluster
RPIDRPID-789
aws:ec2launchtemplate:idlt-0123456789abcdef0
aws:cloudformation:logical-idMasterServer
aws:cloudformation:stack-nameparallelcluster-RONIN-RPID-789-compute-cluster
os_descUbuntu Server 18.04 LTS
last_modified_byusername:user@ronin.cloud:started
purchase_order67890
osubuntu
ClusterNamecompute-cluster
aws-parallelcluster-attributesubuntu1804, slurm, 2.6.1
billing_codeHPC-COMPUTE
hpc_dnscompute-cluster
Namecompute-cluster
default_unameubuntu
created_byusername:user@ronin.cloud
template_versionronin.pcluster.2.6.1.template

RONIN Tags for EBS Volumes (Drive Storage)

RONIN tags EBS volumes, which it refers to as "drive storage," to provide context and facilitate management. Key tags include:

Tag KeyDescriptionExample Value
dnsThe DNS prefix of the machine the volume is attached to (if applicable).machine-dns
NameThe user-defined name for the volume.volume-name
billing_codeOrganization-specific billing code.BILLING-STORAGE
os_descOperating system description of the machine the volume is or was attached to.Ubuntu Server 20.04 LTS
purchase_orderProject-level purchase order code.PO-54321
image_urlImage URL associated with the volume.img/os/ubuntu.png
R-METAMetadata about the volume's association with a machine, including root device details.NAME=machine-name:ID=i-abcdefg:ROOT=/dev/sda1:ROOT_BOOL=true
RPIDRONIN Project ID.RPID-987
default_unameDefault username for the associated machine.ubuntu
descriptionDescription of the volume's purpose.Data storage volume
osOS type keyword.ubuntu
AWS-IDAWS instance ID of the associated machine (if applicable).i-0fedcba9876543210

Example Scenario: A user creates a volume and calls it "data-volume" in project "RPID-999" and later attaches it to the machine "analysis-server", the tags look like this:

Tag KeyValue
dnsanalysis-server
Namedata-volume
billing_codeSTORAGE-DATA
os_descUbuntu Server 20.04 LTS
purchase_orderPO-13579
image_urlimg/os/ubuntu.png
R-METANAME=analysis-server:ID=i-0fedcba9876543210:ROOT=/dev/sda1:ROOT_BOOL=true
RPIDRPID-999
default_unameubuntu
descriptionPrimary data storage
osubuntu
AWS-IDi-0fedcba9876543210

RONIN Tags for Snapshots (Backups)

RONIN tags snapshots, referred to as "backups," with the following key tags:

Tag KeyDescriptionExample Value
dnsDNS prefix of the associated machine or volume.machine-dns
descriptionDescription of the snapshot's purpose.OS backup
purchase_orderProject-level purchase order code.PO-24680
image_urlImage URL associated with the snapshot.img/os/ubuntu.png
packageIndicates if the snapshot is associated with a package (AMI).true or false
NameUser-defined name for the snapshot.snapshot-name
osOS type keyword.ubuntu
os_descOperating system description.Ubuntu Server 18.04 LTS
billing_codeOrganization-specific billing code.BACKUP-CODE
environmentEnvironment associated with the snapshot (if applicable).production
RPIDRONIN Project ID.RPID-135
requestorUser who initiated the snapshot creation.username:user@ronin.cloud
AWS-IDAWS instance ID of the associated machine or volume (if applicable).i-0abcdef1234567890
default_unameDefault username for the associated machine.ubuntu

Example Scenario: A user creates a snapshot from a volume attached to "machine-one" and calls it "machine-one-backup" in project "RPID-246", the tags look like this:

Tag KeyValue
dnsmachine-one
descriptionBackup of machine-one OS volume
purchase_orderPO-86420
image_urlimg/os/ubuntu.png
packagefalse
Namemachine-one-backup
osubuntu
os_descUbuntu Server 20.04 LTS
billing_codeBKP-STANDARD
environmentproduction
RPIDRPID-246
requestorusername:user@ronin.cloud
AWS-IDi-0abcdef1234567890
default_unameubuntu

RONIN Tags for AMIs (Packages)

RONIN tags AMIs, referred to as "packages," with these important tags:

Tag KeyDescriptionExample Value
default_unameDefault username for instances launched from the AMI.ubuntu
RPIDRONIN Project ID.RPID-864
NameUser-defined name for the AMI.ami-name
purchase_orderProject-level purchase order code.PO-75310
descriptionDescription of the AMI's purpose or contents.Custom AMI
os_descOperating system description.Ubuntu 20.04 LTS
osOS type keyword.ubuntu
billing_codeOrganization-specific billing code.AMI-CUSTOM
image_urlImage URL associated with the AMI.img/os/ubuntu.png
dnsDNS prefix (if applicable).ami-dns

Example Scenario: A user creates an AMI and calls it "custom-ami" in project "RPID-864", the tags look like this:

Tag KeyValue
default_unameubuntu
RPIDRPID-864
Namecustom-ami
purchase_orderPO-75310
descriptionCustom AMI with pre-installed tools
os_descUbuntu 20.04 LTS
osubuntu
billing_codeAMI-CUSTOM
image_urlimg/os/ubuntu.png
dnscustom-ami

RONIN Tags for S3 Buckets (Object Storage)

RONIN tags object storage buckets, with these important tags:

Tag KeyDescriptionExample Value
RPIDRONIN Project ID.RPID-864
NameUser-defined name for the bucket.bucketname
purchase_orderProject-level purchase order code.PO-75310
billing_codeOrganization-specific billing code.AMI-CUSTOM
created_byThe user who created the bucket.username:user@ronin.cloud
empty_bucket_ruleA temporary tag that is applied whilst a bucket is being emptied to instruct whether it will be kept or deleted.keep/delete

Example Scenario: A user creates an object storage bucket and calls it "mydata" in project "RPID-864", the tags look like this:

Tag KeyValue
RPIDRPID-864
Namemydata
purchase_orderPO-75310
billing_codeAMI-CUSTOM
created_byusername:user@ronin.cloud
empty_bucket_rulekeep

Custom Tag Mapping: Enhancing Flexibility

RONIN offers custom tag mapping capabilities to further tailor your resource management:

  1. Static Tags: These tags have a fixed, predefined value applied at the configuration level. They are useful for identifying ALL resources created by automated RONIN processes within an AWS account.
  2. Session Level Tags: These tags dynamically pull information from a user's session data (e.g., email, user ID) and apply it to resources they create.
  3. Project Level Tags: These tags leverage existing project-level metadata but allow you to rename them for compatibility with external systems or specific workflows.

Custom Tag Mapping Example:

RONIN's configuration allows you to map custom tag keys to specific data sources using a simple key-value structure. Here's an example of how custom tags might be mapped:

Custom Tag KeyMappingDescription
chart-stringproject:billing_codeMaps the "chart-string" tag to the project's billing code.
requestor-uniuser:emailMaps the "requestor-uni" tag to the user's email address.
environmentstatic:productionAssigns a static value of "production" to the "environment" tag, useful for identifying production resources.

Example Scenario:

When a user creates a resource, and the project's billing code is "PROJECT-BILLING" and the user's email is "user@ronin.cloud", the following custom tags would be applied based on the above mapping:

Tag KeyValue
chart-stringPROJECT-BILLING
requestor-uniuser@ronin.cloud
environmentproduction

Conclusion

RONIN's comprehensive tagging system empowers users to manage their AWS resources effectively. By understanding the different types of tags – EC2 machine tags, ParallelCluster tags, EBS volume tags, snapshot tags, AMI tags and custom tags – users can gain valuable insights into their infrastructure, automate workflows, track costs, and enforce organisational policies. Leveraging these tagging capabilities is crucial for maximising the benefits of RONIN and streamlining cloud computing for research.

via GIPHY