### Run CTFd Nomad Pack Example Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/ctfd/README.md An example command to run the CTFd Nomad pack, specifying datacenters and a static host port for CTFd. It also notes that host volume contents are not erased and should be checked if deployment fails. ```Shell nomad-pack run . --var=datacenters='["dc1"]' --var ctfd_port=8888 ``` -------------------------------- ### Prometheus CLI Arguments HCL Example Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/prometheus/README.md An HCL example showing the default command-line arguments passed to the Prometheus task, configuring its file paths and web interface. ```HCL [ "--config.file=/etc/prometheus/config/prometheus.yml", "--storage.tsdb.path=/prometheus", "--web.listen-address=0.0.0.0:9090", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles", ] ``` -------------------------------- ### Default PostgreSQL Database Mount Configuration Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/nextcloud/README.md Provides a default JSON configuration for `postgres_mounts`. This example sets up a bind mount for PostgreSQL data, mapping the host path `/var/nextcloud/postgresql/data` to the container path `/var/lib/postgresql/data`. ```JSON [ { "bind_options": [], "readonly": false, "source": "/var/nextcloud/postgresql/data", "target": "/var/lib/postgresql/data", "type": "bind" } ] ``` -------------------------------- ### Prometheus Task Services HCL Example Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/prometheus/README.md An HCL example showing the default configuration for a Prometheus service, including port, name, tags, and health check settings. ```HCL [ { service_port_label = "http", service_name = "prometheus", service_tags = [], check_enabled = true, check_path = "/-/healthy", check_interval = "3s", check_timeout = "1s", } ] ``` -------------------------------- ### Execute Nomad Pack Plan with Required Variables Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/democratic_csi_nfs/README.md This example shows how to use the `nomad-pack plan` command to preview the deployment of the `democratic-csi` plugin. It explicitly passes the required `nfs_share_host`, `nfs_share_base_path`, and `nfs_controller_mount_path` variables. ```sh nomad-pack plan \ -var nfs_share_host=192.168.56.60 \ -var nfs_share_base_path=/var/nfs/general \ -var nfs_controller_mount_path=/srv/nfs_data \ . ``` -------------------------------- ### Nomad Pack Run Command for Standalone Redis Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/redis/README.md Example command to deploy a standalone Redis instance using Nomad Pack. It demonstrates how to specify a custom job name, enable host volume persistence, and set a specific Redis Docker image version, providing a complete deployment example. ```Shell nomad-pack run redis --var job_name="redis-standalone" --var use_host_volume=true --var image="redis:6.2.6" ``` -------------------------------- ### Nomad CSI Volume Specification Example (HCL) Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/democratic_csi_nfs/README.md Provides an example HCL configuration for a CSI volume, detailing its type, ID, name, plugin, capabilities (access modes, attachment modes), and mount options. This HCL file defines how a persistent volume should be provisioned and accessed within Nomad. ```hcl type = "csi" id = "my_volume" namespace = "default" name = "my_volume" plugin_id = "org.democratic-csi.nfs" capability { access_mode = "multi-node-multi-writer" attachment_mode = "file-system" } capability { access_mode = "single-node-writer" attachment_mode = "file-system" } capability { access_mode = "single-node-reader-only" attachment_mode = "file-system" } mount_options { mount_flags = ["noatime"] } ``` -------------------------------- ### Run OTel Collector and Traefik Example with Nomad Pack Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/opentelemetry_collector/README.md Execute these commands from the repository root to deploy the Traefik and OpenTelemetry Collector services using Nomad Pack, leveraging specific HCL variable files for configuration. ```bash nomad-pack run traefik -f packs/opentelemetry_collector/examples/traefik_vars.hcl nomad-pack run opentelemetry_collector -f packs/opentelemetry_collector/examples/with_traefik.hcl ``` -------------------------------- ### Install and Configure NFS Server on Debian/Ubuntu Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/democratic_csi_nfs/README.md This snippet provides shell commands to install and configure an NFS kernel server on an apt-based Linux distribution. It creates a shared directory, configures `/etc/exports` to allow access from a specific subnet, and enables/starts the NFS service. ```sh sudo apt-get install nfs-kernel-server sudo mkdir /var/nfs/general sudo cat < /etc/exports /var/nfs/general 192.168.56.0/24(rw,sync,no_subtree_check,no_root_squash) EOF sudo systemctl enable nfs-kernel-server sudo systemctl start nfs-kernel-server ``` -------------------------------- ### Default Nextcloud Application Mount Configuration Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/nextcloud/README.md Illustrates a default JSON configuration for `app_mounts`. This example sets up a bind mount for Nextcloud application data, mapping the host path `/var/nextcloud/html/data` to the container path `/var/www/html/`. ```JSON [ { "bind_options": [], "readonly": false, "source": "/var/nextcloud/html/data", "target": "/var/www/html/", "type": "bind" } ] ``` -------------------------------- ### Define Type for Prestart Directory Creation Flag Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/nextcloud/README.md Defines the HCL type for `prestart_directory_creation` as a boolean. This flag determines whether a prestart task should be launched to create necessary volume directories on the host machine before the main application starts. ```Nomad Pack HCL bool ``` -------------------------------- ### Example Sonarqube Environment Variables Configuration Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/sonarqube/README.md This HCL snippet provides an example of how to configure Sonarqube's environment variables, specifically for database connection details. These variables are passed to the Docker container running Sonarqube, allowing it to connect to an external database instead of the default embedded H2 database. ```HCL sonarqube_env_vars = [ { key = "SONAR_JDBC_URL" value = "database connection URL" }, { key = "SONAR_JDBC_USERNAME" value = "sonar" }, { key = "SONAR_JDBC_PASSWORD" value = "sonar" } ] ``` -------------------------------- ### Nomad Job Constraints HCL Example Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/prometheus/README.md An HCL example demonstrating how to define a constraint to run the Prometheus job only on clients with a Linux kernel, using attribute, value, and operator. ```HCL [ { attribute = "$${attr.kernel.name}", value = "linux", operator = "", } ] ``` -------------------------------- ### Configure Resource Limits in Nomad Pack HCL Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/simple_service/README.md Example HCL snippet for setting CPU and memory resource limits for a Nomad job, typically used within a pack configuration. ```HCL resources = { cpu = 500 memory = 501 } ``` -------------------------------- ### Configure Consul Service Registration and Tags in HCL Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/simple_service/README.md HCL example demonstrating how to enable Consul service registration and add specific tags for integration with load balancers like Fabio and Traefik, including URL prefixing and Traefik rule definitions. ```HCL register_consul_service = true consul_tags = [ "urlprefix-/", "traefik.enable=true", "traefik.http.routers.http.rule=Path(\`/\`)" ] ``` -------------------------------- ### Example HCL for OpenTelemetry Collector Network Configuration Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/opentelemetry_collector/README.md Provides a default HCL configuration for the OpenTelemetry Collector's network, setting up a bridge mode with common OTLP, metrics, and tracing ports. ```HCL { mode = "bridge" ports = { "otlp" = 4317 "otlphttp" = 4318 "metrics" = 8888 "zipkin" = 9411 "healthcheck" = 13133 "jaeger-grpc" = 14250 "jaeger-thrift-http" = 14268 "zpages" = 55679 } } ``` -------------------------------- ### Default Nextcloud Database Environment Variables Configuration Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/nextcloud/README.md Provides a default JSON configuration for the `db_env_vars` input. This example sets common PostgreSQL connection parameters such as database name, user, password, and host, which are essential for Nextcloud's database connectivity. ```JSON [ { "key": "POSTGRES_DB", "value": "nextcloud" }, { "key": "POSTGRES_USER", "value": "nextcloud" }, { "key": "POSTGRES_PASSWORD", "value": "password" }, { "key": "POSTGRES_HOST", "value": "localhost" } ] ``` -------------------------------- ### HCL Example: Configuring Vector API Service Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/vector/README.md Illustrates a sample HCL configuration for the `vector_task_services` variable. This example demonstrates how to define a single Vector API service with specific port, name, tags, and health check settings, aligning with the default values and structure. ```HCL [ { service_port_label = "api", service_name = "vector", service_tags = ["observability"], check_enabled = true, check_path = "/health", check_interval = "3s", check_timeout = "1s" } ] ``` -------------------------------- ### Example Nomad Job Constraint for Linux Kernel Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/vector/README.md This HCL example demonstrates how to define a constraint within a Nomad job to ensure it only runs on clients with a Linux kernel. It showcases the structure of the `constraints` list of objects, including attribute, value, and operator. ```HCL [ { attribute = "$${attr.kernel.name}", value = "linux", operator = "", } ] ``` -------------------------------- ### Run Nomad Agent for Docker Desktop (Shell) Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/hashicups/README.md This command starts the Nomad agent in development mode, binding it to a specific network interface (e.g., `0.0.0.0` on `en0`). This is crucial for enabling inter-container communication when running Nomad on a local machine with Docker Desktop, as it ensures containers can access the Nomad client. ```Shell $ nomad agent -dev -bind=0.0.0.0 -network-interface=en0 ``` -------------------------------- ### Example HCL for Nomad Job Constraints Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/opentelemetry_collector/README.md Illustrates how to define a constraint in HCL to restrict job placement to Linux kernel nodes, demonstrating the use of attribute, value, and operator. ```HCL [ { attribute = "$${attr.kernel.name}", value = "linux", operator = "", } ] ``` -------------------------------- ### Run Nomad Pack for Terraform Enterprise FDO Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/tfe_fdo_nomad/README.md This bash command executes the 'tfe_fdo_nomad' pack using 'nomad-pack run'. It requires a 'variables.hcl' file to provide necessary configuration variables for the pack's deployment, initiating the Terraform Enterprise setup. ```bash $ nomad-pack run tfe_fdo_nomad -f variables.hcl ``` -------------------------------- ### Pass Custom Constraints to Nomad Pack via CLI Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/ceph/README.md This example demonstrates how to supply custom constraints to a Nomad Pack execution using the `nomad-pack run` command's `-var` argument. It shows how to define a list of constraint objects directly on the command line, enabling dynamic job placement rules. ```bash nomad-pack run -var 'constraints=[{"attribute":"$${meta.my_custom_value}","operator":">","value":"3"}]' packs/ceph ``` -------------------------------- ### Configure Nomad Service Tag for Fabio Routing Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/fabio/README.md Demonstrates how to add a `urlprefix-/PATH` tag to a Nomad service stanza to enable routing via Fabio. This tag directs Fabio to route requests starting with the specified URL path to the service. ```HCL service { ... tags = ["urlprefix-/myapp"] ... } ``` -------------------------------- ### Define Nomad Job Constraints in HCL for Fabio Task Placement Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/fabio/README.md Illustrates the HCL structure for defining job constraints, specifically to restrict the Fabio task to run on nodes with a Linux kernel. This example shows how to use attributes, values, and operators within a list of objects. ```HCL [ { attribute = "$${attr.kernel.name}", value = "linux", operator = "", } ] ``` -------------------------------- ### Customize WordPress Task Resources in Nomad Pack Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/wordpress/README.md This HCL example demonstrates how to customize the CPU and memory resources allocated to the WordPress task within the Nomad Pack. Users can adjust these values to meet the specific performance requirements of their WordPress instance, ensuring optimal resource utilization. ```HCL wordpress_task_resources = { cpu = 1024 memory = 2048 } ``` -------------------------------- ### Nomad Volume HCL Specification for AWS EFS CSI Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/aws_efs_csi/README.md Example HCL configuration for a Nomad volume, demonstrating how to create an access point to an existing EFS file system using the AWS EFS CSI plugin. Includes required parameters. ```hcl id = "test" name = "Test" type = "csi" plugin_id = "aws-efs" capacity_max = "1G" capacity_min = "1M" capability { access_mode = "single-node-writer" attachment_mode = "file-system" } parameters { provisioningMode = "efs-ap" fileSystemId = "" directoryPerms = "700" gidRangeStart = "1000" gidRangeEnd = "2000" basePath = "/test" } ``` -------------------------------- ### Run Nomad Pack with Custom Docker Image Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/wordpress/README.md This example command demonstrates how to run the WordPress Nomad Pack while overriding the default Docker image for WordPress. The '--var' flag is used to pass a custom value for 'wordpress_task_image', allowing users to specify a different version or build of the WordPress Docker image. ```Shell nomad-pack run wordpress --var wordpress_task_image="wordpress:5.8.1-apache" ``` -------------------------------- ### Pass Nomad Constraints via CLI -var Argument Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/aws_efs_csi/README.md Demonstrates how to pass complex 'constraints' as a variable to the 'nomad-pack run' command using the '-var' argument. Shows an example of a custom meta attribute constraint. ```bash nomad-pack run -var 'constraints=[{"attribute":"$${meta.my_custom_value}","operator":">","value":"3"}]' packs/aws_efs_csi ``` -------------------------------- ### Nomad Pack AWS EBS CSI Plugin Configuration Variables Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/aws_ebs_csi/README.md Detailed documentation of all configurable variables for the AWS EBS CSI plugin Nomad pack. This includes general job settings, plugin image details, logging levels, availability zones, controller instance counts, and parameters for example volume specifications. It also outlines the structure for custom `constraints` and `resources` objects. ```APIDOC Variables: job_name: string (default: "democratic_csi") - The prefix to use as the job name for the plugins. datacenters: list(string) (default: ["dc1"]) - A list of datacenters in the region which are eligible for task placement. region: string (default: "global") - The region where the job should be placed. plugin_id: string (default: "org.democratic-csi.nfs") - The ID to register in Nomad for the plugin. plugin_namespace: string (default: "default") - The namespace for the plugin job. plugin_image: string (default: "public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.5.1") - The container image for the plugin. plugin_csi_spec_version: string (default: "1.5.0") - The CSI spec version that democratic-csi will comply with. plugin_log_level: string (default: "debug") - The log level for the plugin. availability_zones: list(string) (default: ["us-east-1b"]) - AWS availability zones for the node plugins and example volume output. controller_count: number (default: 2) - The number of controller instances to be deployed (at least 2 recommended). volume_id: string (default: "myvolume") - ID for the example volume spec to output. volume_namespace: string (default: "default") - Namespace for the example volume spec to output. volume_min_capacity: string (default: "10GiB") - Minimum capacity for the example volume spec to output. volume_max_capacity: string (default: "30GiB") - Maximum capacity for the example volume spec to output. volume_type: string (default: "gp2") - AWS EBS volume type. constraints: List of Objects attribute: string - Specifies the name or reference of the attribute to examine for the constraint. operator: string - Specifies the comparison operator. value: string - Specifies the value to compare the attribute against. resources: Object cpu: number (default: 500) - Specifies the CPU required to run this task in MHz. memory: number (default: 256) - Specifies the memory required in MB. ``` -------------------------------- ### Set Host Path for PostgreSQL Persistent Storage in Nomad Pack (CLI) Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/outline/README.md This example shows how to specify a custom host path for PostgreSQL's persistent storage volume using the `nomad-pack run` command. This allows users to control where data is stored on the host system, ensuring data persistence across restarts. ```Shell nomad-pack run outline --var postgresql_task_volume_path="/var/lib/outline/postgresql" ``` -------------------------------- ### Customize Application Resource Limits in Nomad Pack (HCL) Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/outline/README.md This example demonstrates how to customize the CPU and memory resource limits for an application task, specifically Outline, within a Nomad Pack deployment. Setting resource limits helps manage the allocation of system resources to ensure application stability and performance. ```HCL outline_task_resources = { cpu = 1024 memory = 2048 } ``` -------------------------------- ### Deploy Docker Image with nomad-pack Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/simple_service/README.md Demonstrates how to specify a custom Docker image for deployment using the `nomad-pack run` command and the `--var` flag. ```shell nomad-pack run simple_service --var image="httpd:latest" ``` -------------------------------- ### Fabio Nomad Pack Configuration Variables Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/fabio/README.md Comprehensive API documentation for all configurable variables within the Fabio Nomad pack. This includes general job settings, network configurations, task-specific parameters, and resource allocations, detailing their types, default values, and descriptions. ```APIDOC Fabio Pack Variables: job_name (string ""): The name to use as the job name which overrides using the pack name. datacenters (list(string) ["dc1"]): A list of datacenters in the region which are eligible for task placement. region (string "global"): The region where the job should be placed. namespace (string "default"): The namespace where the job should be placed. constraints (list(object)): Constraints to apply to the entire job. - attribute (string): Specifies the name or reference of the attribute to examine for the constraint. - operator (string): Specifies the comparison operator. The ordering is compared lexically. - value (string): Specifies the value to compare the attribute against using the specified operation. fabio_group_network (object): The Fabio network configuration options. - mode (string "host"): Mode of the network. - ports (map http:9999,ui:9998): Specifies the port mapping for the Fabio task. The map key indicates the port label, and the value is the Fabio port inside the network namespace. The default value `9999` and `9998` represent the HTTP router and Fabio UI respectively. fabio_task_config (object): Configuration options to use for the Fabio task driver config. - version (string "1.5.15-go1.15.5"): The version of the Fabio application to run. fabio_task_app_properties (string ""): The contents of a Fabio properties file to pass to the Fabio app. fabio_task_resources (object): The resource to assign to the Fabio task. - cpu (number 500): Specifies the CPU required to run this task in MHz. - memory (number 256): Specifies the memory required in MB. ``` -------------------------------- ### Run Nomad Pack with Custom Message Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/hello_world/README.md This command demonstrates how to run the Nomad Pack 'hello_world' and customize the message it responds with. By setting the 'message' variable, users can easily change the service's output without modifying the pack's source code. ```shell nomad-pack run hello_world --var message="Hola Mundo!" ``` -------------------------------- ### Nomad Job Constraints Object Definition and Example Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/traefik/README.md Defines the structure for the `constraints` variable, used to restrict eligible nodes for Traefik task placement. It includes attributes for specifying the constraint, operator, and value. An HCL example demonstrates constraining the job to run on Linux kernel nodes. ```APIDOC attribute (string): Specifies the name or reference of the attribute to examine for the constraint. operator (string): Specifies the comparison operator. The ordering is compared lexically. value (string): Specifies the value to compare the attribute against using the specified operation. ``` ```HCL [ { attribute = "$$\{attr.kernel.name}", value = "linux", operator = "", } ] ``` -------------------------------- ### Default Value for Prestart Directory Creation Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/nextcloud/README.md Sets the default value for `prestart_directory_creation` to `true`. This enables the prestart task by default, ensuring that required volume directories are automatically created on the host. ```Nomad Pack HCL true ``` -------------------------------- ### Run Nomad Ingress Nginx Pack Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/nomad_ingress_nginx/README.md Command to deploy the Nomad Ingress Nginx pack using `nomad-pack run`, initiating the ingress service. ```shell-session $ nomad-pack run nomad_ingress_nginx ``` -------------------------------- ### Example Nomad CSI Volume Specification for Ceph RBD Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/ceph_rbd_csi/README.md This HCL snippet provides an example Nomad CSI volume specification tailored for the Ceph RBD plugin. It defines essential volume attributes like ID, name, namespace, type, and plugin ID, along with minimum and maximum capacity. The specification also includes access modes (file-system and block-device), and Ceph-specific parameters such as `clusterID`, `pool`, and `imageFeatures`, alongside a placeholder for authentication secrets. ```HCL id = "myvolume" name = "myvolume" namespace = "default" type = "csi" plugin_id = "rbd.csi.ceph.com" capacity_min = "10GiB" capacity_max = "30GiB" capability { access_mode = "single-node-writer" attachment_mode = "file-system" } capability { access_mode = "single-node-writer" attachment_mode = "block-device" } # get this secret from the Ceph allocation: # /etc/ceph/ceph.client.admin.keyring secrets { userID = "admin" userKey = "AQDsIoxgHqpe...spTbvwZdIzA==" } parameters { clusterID = "129ceb60-ae2e-4313-a9f8-cb6087f97787" pool = "rbd" imageFeatures = "layering" } ``` -------------------------------- ### Hello World Service Pack Variables Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/hello_world/README.md This section details the configurable variables for the 'Hello World Service' Nomad Pack. It includes their types and descriptions, allowing users to customize various aspects of the service's behavior and deployment, such as the response message, instance count, and Consul integration settings. ```APIDOC Variables: message (string): The message your application will respond with count (number): The number of app instances to deploy job_name (string): The name to use as the job name which overrides using the pack name datacenters (list of strings): A list of datacenters in the region which are eligible for task placement region (string): The region where jobs will be deployed register_consul_service (bool): If you want to register a consul service for the job consul_service_tags (list of string): The consul service name for the hello-world application consul_service_name (string): The consul service name for the hello-world application ``` -------------------------------- ### Run Nomad Pack with Port Overrides File Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/simple_service/README.md Illustrates how to apply custom port configurations defined in an HCL file (`./overrides.hcl`) to a `nomad-pack run` command using the `-f` flag. ```shell nomad-pack run simple_service -f ./overrides.hcl ``` -------------------------------- ### Default Value for Database Task Inclusion Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/nextcloud/README.md Sets the default value for `include_database_task` to `true`. This indicates that a database task is included by default, allowing for an embedded database setup unless explicitly disabled. ```Nomad Pack HCL true ``` -------------------------------- ### CTFd Nomad Pack Dependencies Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/ctfd/README.md Details the required Docker driver and pre-existing volumes for the CTFd Nomad pack, including their purpose and configurable names. It also highlights the reliance on Consul for health checking and service discovery. ```APIDOC Dependencies: - Docker driver: Required and must be enabled. - Volumes (R/W access required): - uploads_volume_name: Description: Where to store files uploaded through CTFd (ex.: challenges' attachments). - mariadb_volume_name: Description: MariaDB data storage. - redis_volume_name: Description: Redis data and periodic backup storage. - Consul: Relies on existing Consul integration for health checking and service discovery. ``` -------------------------------- ### Create Nomad Volume from HCL File Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/democratic_csi_nfs/README.md Shows the command-line instruction to create a Nomad volume using a previously defined HCL specification file. This command initiates the volume provisioning process based on the configuration provided in 'volume.hcl'. ```sh nomad volume create volume.hcl ``` -------------------------------- ### Prometheus Scrape Configuration for Consul Exporter Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/prometheus_consul_exporter/README.md Example Prometheus scrape configuration entry to discover and scrape deployed Consul exporter instances. It uses Consul's service discovery to find services named 'prometheus-consul-exporter'. ```YAML - job_name: "consul_exporter" metrics_path: "/metrics" consul_sd_configs: - server: "consul.example.com:8500" services: - "prometheus-consul-exporter" ``` -------------------------------- ### CTFd Nomad Pack Configuration Variables Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/ctfd/README.md Lists all configurable variables for the CTFd Nomad pack, including their type, default value, and description. These variables cover job naming, deployment regions and datacenters, Consul service registration, volume settings, resource allocations, and Docker image details for CTFd, MariaDB, and Redis. ```APIDOC Variables: - job_name: Type: string Default: "ctfd" Description: The name to use as the job name which overrides using the pack name. - region: Type: string Default: "" Description: The region where jobs will be deployed. - datacenters: Type: list("string") Default: ["dc1"] Description: A list of datacenters in the region which are eligible for task placement. - namespace: Type: string Default: N/A Description: The namespace where the job should be placed. - register_consul_service: Type: bool Default: "False" Description: If you want to register a Consul service for the job. - consul_service_name: Type: string Default: "ctfd" Description: The consul service name for the application. - consul_service_tags: Type: list("string") Default: ["ctfd"] Description: The consul service tags for the application. - uploads_volume_name: Type: string Default: "ctfd_uploads" Description: The name of the dedicated data volume you want CTFd to store file uploads into. - uploads_volume_type: Type: string Default: "host" Description: The type of the dedicated data volume you want CTFd to store file uploads into. - mariadb_volume_name: Type: string Default: "ctfd_mariadb" Description: The name of the dedicated data volume you want MariaDB to store data into. - mariadb_volume_type: Type: string Default: "host" Description: The type of the dedicated data volume you want MariaDB to store data into. - redis_volume_name: Type: string Default: "ctfd_redis" Description: The name of the dedicated data volume you want Redis to store data into. - redis_volume_type: Type: string Default: "host" Description: The type of the dedicated data volume you want Redis to store data into. - ctfd_resources: Type: object({cpu:"number",memory:"number"}) Default: {cpu: 250, memory: 500} Description: The resources reserved for CTFd itself. - ctfd_image_name: Type: string Default: "ctfd/ctfd" Description: The CTFd Docker image name to pull. - ctfd_image_tag: Type: string Default: "3.3.1-release" Description: The CTFd Docker image tag to pull. - ctfd_port: Type: number Default: N/A Description: The static host port that CTFd will be served on. If not specified, an external reverse proxy will be needed. - ctfd_expect_reverse_proxy: Type: bool Default: "False" Description: If you want CTFd to expect being behind a reverse proxy. - mariadb_resources: Type: object({cpu:"number",memory:"number"}) Default: {cpu: 250, memory: 500} Description: The resources reserved for MariaDB. - mariadb_image_name: Type: string Default: "mariadb" Description: The MariaDB Docker image name to pull. - mariadb_image_tag: Type: string Default: "10" Description: The MariaDB Docker image tag to pull. - mariadb_root_password: Type: string Default: "ctfd" Description: The password that will be used for the 'root' MariaDB user. - mariadb_ctfd_password: Type: string Default: "ctfd" Description: The password that will be used to create the 'ctfd' MariaDB user. - redis_resources: Type: object({cpu:"number",memory:"number"}) Default: {cpu: 250, memory: 500} Description: The resources reserved for Redis. - redis_image_name: Type: string Default: "redis" Description: The Redis Docker image name to pull. - redis_image_tag: Type: string Default: "6" Description: The Redis Docker image tag to pull. ``` -------------------------------- ### Default Nomad Job Constraints HCL Configuration Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/aws_efs_csi/README.md Example HCL configuration for the default 'constraints' variable, ensuring the job runs on Linux hosts with Docker privileged mode enabled. Shows escaping for attribute names. ```hcl [ { attribute = "$${attr.kernel.name}", value = "linux", operator = null, }, { attribute = "$${attr.driver.docker.privileged.enabled}", value = true, operator = null, } ] ``` -------------------------------- ### HashiCups Configuration Variables (APIDOC) Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/hashicups/README.md Defines the configurable parameters for the HashiCups application, including network settings, Docker image versions for various services, and PostgreSQL database credentials. These variables allow customization of the application's deployment and behavior within a Nomad cluster. ```APIDOC Variable: datacenters Default Value (type): ["dc1"] (list of strings) Description: A list of datacenters in the region which are eligible for task placement. Variable: region Default Value (type): global (string) Description: The region where the job should be placed. Variable: frontend_version Default Value (type): v1.0.2 (string) Description: Frontend Docker image version. Variable: public_api_version Default Value (type): v0.0.6 (string) Description: Public API Docker image version. Variable: payments_version Default Value (type): v0.0.12 (string) Description: Payments API Docker image version. Variable: product_api_version Default Value (type): v0.0.20 (string) Description: Products API Docker image version. Variable: product_api_db_version Default Value (type): v0.0.20 (string) Description: Products API database Docker image version. Variable: postgres_db Default Value (type): products (string) Description: The Postgres database name. Variable: postgres_user Default Value (type): postgres (string) Description: The Postgres database user. Variable: postgres_password Default Value (type): password (string) Description: The Postgres database user's password. Variable: product_api_port Default Value (type): 9090 (number) Description: The products API service port. Variable: frontend_port Default Value (type): 3000 (number) Description: The frontend service port. Variable: payments_api_port Default Value (type): 8080 (number) Description: The payments API service port. Variable: public_api_port Default Value (type): 8081 (number) Description: The public API service port. Variable: nginx_port Default Value (type): 80 (number) Description: The Nginx reverse proxy port. ``` -------------------------------- ### Define Nomad Job Constraints for Node Exporter Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/prometheus_node_exporter/README.md This HCL snippet demonstrates how to define constraints for the Nomad job, restricting task placement. The example shows a constraint to run the job only on clients with a Linux kernel, using escaped variables. ```HCL [ { attribute = "$${attr.kernel.name}", value = "linux", operator = "", } ] ``` -------------------------------- ### Nomad Pack Variables Reference Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/backstage/README.md This section provides a comprehensive reference for all configurable variables available within the Nomad pack. It details each variable's name, type, and purpose, enabling users to customize job names, datacenters, Docker images, and resource allocations for Backstage and PostgreSQL. ```APIDOC Nomad Pack Variables: job_name: type: string description: The name to use as the job name which overrides using the pack name datacenters: type: list of strings description: A list of datacenters in the region which are eligible for task placement region: type: string description: The region where jobs will be deployed postgresql_group_nomad_service_name: type: string description: The nomad service name for the PostgreSQL application postgresql_task_image: type: string description: PostgreSQL's Docker image (must include the tag) postgresql_task_volume_path: type: string description: The volume's absolute path in the host to be used by PostgreSQL postgresql_task_resources: type: object, number number description: The resources to assign to the PostgreSQL service backstage_group_nomad_service_name: type: string description: The nomad service name for the Backstage application backstage_task_image: type: string description: Backstage's Docker image (must include the tag) backstage_task_nomad_vars: type: map of string description: Backstage's nomad variables (see below for the details) backstage_task_resources: type: object, number number description: The resources to assign to the Backstage service ``` -------------------------------- ### Nomad Job Constraints for Prometheus Consul Exporter Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/prometheus_consul_exporter/README.md Details the structure and usage of job constraints to restrict node eligibility for the Prometheus Consul Exporter task. Includes an HCL example demonstrating how to constrain the job to Linux kernel nodes. ```APIDOC constraints List of Objects: attribute (string) - Specifies the name or reference of the attribute to examine for the constraint. operator (string) - Specifies the comparison operator. The ordering is compared lexically. value (string) - Specifies the value to compare the attribute against using the specified operation. ``` ```HCL [ { attribute = "$${attr.kernel.name}", value = "linux", operator = "", } ] ``` -------------------------------- ### Nomad Pack Input Variables Reference Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/nextcloud/README.md A comprehensive reference of all available input variables for a HashiCorp Nomad Pack. Each entry specifies the variable's name, its purpose, data type, default value, and whether it is required, enabling precise control over the deployment's behavior. ```APIDOC job_name: string (Default: "", Required: no) Description: The name to use as the job name which overrides using the pack name. namespace: string (Default: "default", Required: no) Description: The namespace where the job should be placed. datacenters: list(string) (Default: [ "dc1" ], Required: no) Description: A list of datacenters in the region which are eligible for task placement. region: string (Default: "global", Required: no) Description: The region where the job should be placed. nextcloud_image_tag: string (Default: "latest", Required: no) Description: The docker image tag. For options, see https://hub.docker.com/_/nextcloud postgres_image_tag: string (Default: "9.6.14", Required: no) Description: Tag for postgres image For options, see https://hub.docker.com/_/postgres constraints: list(object({ attribute = string operator = string value = string })) (Default: [ { "attribute": "${attr.kernel.name}", "operator": "=", "value": "linux" } ], Required: no) Description: Constraints to apply to the entire job. network: object({ mode = string ports = list(object({ name = string to = number static = number })) }) (Default: { "mode": "bridge", "ports": [ { "name": "http", "static": 4001, "to": 80 }, { "name": "db", "static": 5432, "to": 5432 } ] }, Required: no) Description: The group network configuration options. app_service: object({ service_port_label = string service_name = string service_tags = list(string) check_enabled = bool check_type = string check_path = string check_interval = string check_timeout = string upstreams = list(object({ name = string port = number })) }) (Default: null, Required: no) Description: Configuration for the application service. db_service: object({ service_port_label = string service_name = string service_tags = list(string) check_enabled = bool check_type = string check_path = string check_interval = string check_timeout = string upstreams = list(object({ name = string port = number })) }) (Default: { "check_enabled": true, "check_interval": "30s", "check_path": "", "check_timeout": "2s", "check_type": "tcp", "service_name": "nextcloud-db", "service_port_label": "db", "service_tags": [ "postgres" ], "upstreams": [] }, Required: no) Description: Configuration for the database service. app_resources: object({ cpu = number memory = number }) (Default: { "cpu": 500, "memory": 2048 }, Required: no) Description: The resource to assign to the NextCloud app task. db_resources: object({ cpu = number memory = number }) (Default: { "cpu": 100, "memory": 512 }, Required: no) Description: The resource to assign to the NextCloud app task. container_args: list(string) (Default: [], Required: no) Description: Arguments to pass to the Nextcloud container env_vars: list(object({ key = string value = string })) (Default: [ { "key": "NEXTCLOUD_ADMIN_USER", "value": "admin" }, { "key": "NEXTCLOUD_ADMIN_PASSWORD", "value": "password" }, { "key": "NEXTCLOUD_DATA_DIR", "value": "/var/www/html/data" } ], Required: no) Description: Nextcloud environment variables. ``` -------------------------------- ### Configure Nomad Client Host Volume for PostgreSQL Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/backstage/README.md This HCL configuration defines a host volume named 'backstage-postgres' within the Nomad client's configuration. It maps to '/var/lib/postgres' and is set to be writable, specifically designed to persist PostgreSQL's state across restarts. ```HCL client { host_volume "backstage-postgres" { path = "/var/lib/postgres" read_only = false } } ``` -------------------------------- ### Configure Nomad Client Host Volume for MariaDB Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/wordpress/README.md This HCL block defines a host volume in the Nomad client configuration, specifically named 'wordpress-mariadb'. It points to '/var/lib/mariadb' and is set to be writable, enabling persistent storage for the MariaDB database. The specified directory must be created on the host beforehand. ```HCL client { host_volume "wordpress-mariadb" { path = "/var/lib/mariadb" read_only = false } } ``` -------------------------------- ### Terraform Enterprise Deployment Configuration Parameters Source: https://github.com/hashicorp/nomad-pack-community-registry/blob/main/packs/tfe_fdo_nomad/README.md A comprehensive list of parameters used to configure a Terraform Enterprise instance, detailing their purpose, whether they are required, and their default values. ```APIDOC tfe_hostname: (Required: yes) (Default: "") The host name of the TFE instance to be used while deploying. tfe_iact_subnets: (Required: no) (Default: "") Comma-separated list of subnets in CIDR notation that are allowed to retrieve the initial admin creation token via the API . tfe_iact_time_limit: (Required: no) (Default: 60) Number of minutes that the initial admin creation token can be retrieved via the API after the application starts. tfe_vault_disable_mlock: (Required: no) (Default: true) Disable mlock for internal Vault. tfe_resource_cpu: (Required: no) (Default: 750) CPU in MHz for TFE container. tfe_resource_memory: (Required: no) (Default: 1024) Memory in MB for TFE container. tfe_image: (Required: no) (Default: "hashicorp/terraform-enterprise:v202401-2") TFE image and tag to download and run. tfe_image_registry_username: (Required: no) (Default: "terraform") The user name for the registry where the TFE image is hosted. tfe_image_server_address: (Required: no) (Default: "images.releases.hashicorp.com") The server address of the registry where TFE image is hosted. tfe_agent_namespace: (Required: no) (Default: "tfe-agents") Nomad namespace for TFE Agents to run. tfe_agent_image: (Required: no) (Default: "hashicorp/tfc-agent:latest") TFE Agent image and tag to download and run. tfe_vault_cluster_port: (Required: no) (Default: 8201) Vault cluster port which needs to exposed from the TFE container. ```