This page contains in-depth details on how to configure the remote filesystem configuration file for Batch Shipyard.
The remote filesystem schema is as follows:
remote_fs:
resource_group: my-resource-group
location: <Azure region, e.g., eastus>
zone: null
managed_disks:
resource_group: my-disk-resource-group
sku: premium_lrs
disk_size_gb: 128
disk_names:
- p10-disk0a
- p10-disk1a
- p10-disk0b
- p10-disk1b
storage_clusters:
mystoragecluster:
resource_group: my-server-resource-group
hostname_prefix: mystoragecluster
ssh:
username: shipyard
ssh_public_key: /path/to/rsa/publickey.pub
ssh_public_key_data: ssh-rsa ...
ssh_private_key: /path/to/rsa/privatekey
generated_file_export_path: null
public_ip:
enabled: true
static: false
virtual_network:
name: myvnet
resource_group: my-vnet-resource-group
existing_ok: false
address_space: 10.0.0.0/16
subnet:
name: my-server-subnet
address_prefix: 10.0.0.0/24
network_security:
ssh:
- '*'
nfs:
- 1.2.3.0/24
- 2.3.4.5
glusterfs:
- 1.2.3.0/24
- 2.3.4.5
smb:
- 6.7.8.9
custom_inbound_rules:
myrule:
destination_port_range: 5000-5001
protocol: '*'
source_address_prefix:
- 1.2.3.4
- 5.6.7.0/24
file_server:
type: glusterfs
mountpoint: /data
mount_options:
- noatime
- nodiratime
server_options:
glusterfs:
performance.cache-size: 1 GB
transport: tcp
volume_name: gv0
volume_type: distributed
nfs:
'*':
- rw
- sync
- root_squash
- no_subtree_check
samba:
share_name: data
account:
username: myuser
password: userpassword
uid: 1002
gid: 1002
read_only: false
create_mask: '0700'
directory_mask: '0700'
vm_count: 2
vm_size: STANDARD_F16S
fault_domains: 2
accelerated_networking: false
vm_disk_map:
'0':
disk_array:
- p10-disk0a
- p10-disk1a
filesystem: btrfs
raid_level: 0
'1':
disk_array:
- p10-disk0b
- p10-disk1b
filesystem: btrfs
raid_level: 0
prometheus:
node_exporter:
enabled: false
port: 9100
options: []The remote fs schema is constructed from two portions. The first section specifies Azure Managed Disks to use in the storage cluster. The second section defines the storage cluster itself, including networking and virtual machine to disk mapping.
There are two properties which reside outside of these sections:
- (optional)
resource_groupthis is the default resource group to use for both themanaged_disksandstorage_clusterssections. This setting is only used ifresource_groupis not explicitly set in their respective configuration blocks. - (required)
locationis the Azure region name for the resources, e.g.,eastusornortheurope. Thelocationspecified must match the same region as your Azure Batch account if linking a compute pool with a storage cluster. - (optional)
zoneis the availability zone to target for deployment. This option is valid only for regions (i.e.,location) supporting availability zones. This option is required if using Ultra SSD disks. If a zone is specified, automatic availability set creation for distributed/clustered file systems will be disabled. Note that only one zone can be specified and resources are not spread across availability zones for performance reasons.
This section defines the disks used by the file server as specified in the
storage_clusters section. Not all disks specified here need to be used by
the storage cluster, but every disk in the storage cluster should be
defined in this section.
- (optional)
resource_groupthis is the resource group to use for the disks. If this is not specified, then theresource_groupspecified in the parent is used. At least oneresource_groupmust be defined. - (required)
skudefines the disk storage account type to use for the managed disks. Valid values arestandard_lrs,premium_lrs,standard_ssd_lrs, andultra_ssd_lrs. There is no default and this value must be specified. Ifultra_ssd_lrsis specified, then azonemust be specified in an Availability Zone supported Azure region. Regardless of the type of storage used to back managed disks, all data written is durable and persistent backed to Azure Storage. - (required)
disk_size_gbis an integral value defining the size of the data disks to create. Note that for managed disks, you are billed rounded up to the nearest provisioned size. If you are unfamiliar with how Azure prices managed disks with regard to the size of disk chosen, please refer to this link. - (optional)
disk_provisioned_performancedefines provisioned performance parameters for Ultra SSD disks. The following properties are ignored for allskutypes that are notultra_ssd_lrs. Please see the Ultra SSD performance targets documentation for more information regarding the following values.- (required)
iops_read_writeis the target provisioned IOPS for each disk. - (required)
mbps_read_writeis the target provisioned througput for each disk in MB/s.
- (required)
- (required)
disk_namesis an array of disk names to create. All disks will be created identically with the properties defined in themanaged_diskssection.
This section defines the storage clusters containing the file server
specification and disk mapping. This section cross-references the
managed_disks section so both sections must be populated when performing
fs cluster actions.
You can specify multiple storage clusters in the storage_clusters section.
Each key in the storage_clusters dictionary is a unique id for the
storage cluster that you intend to create. This storage cluster id should be
used as the STORAGE_CLUSTER_ID argument for all fs cluster
actions in the CLI along with any configuration specified for linking against
Azure Batch pools, if specified, for pool add. data ingress will also
take this storage cluster id as a parameter if transfering to the file
system. Each storage cluster id (key) is paired with a property
specifying the following properties:
- (optional)
resource_groupthis is the resource group to use for the storage cluster. If this is not specified, then theresource_groupspecified in the parent is used. At least oneresource_groupmust be defined. - (required)
hostname_prefixis the DNS label prefix to apply to each virtual machine and resource allocated for the storage cluster. It should be unique. - (required)
sshis the SSH admin user to create on the machine. This is not optional in this configuration as it is in the pool specification. If you are running Batch Shipyard on Windows, please refer to these instructions on how to generate an SSH keypair for use with Batch Shipyard.- (required)
usernameis the admin user to create on all virtual machines - (optional)
ssh_public_keyis the path to a pre-existing ssh public key to use. If this is not specified, an RSA public/private key pair will be generated for use in your current working directory (with a non-colliding name for auto-generated SSH keys for compute pools, i.e.,id_rsa_shipyard_remotefs). On Windows only, if this is option is not specified, the SSH keys are not auto-generated (unlessssh-keygen.execan be invoked in the current working directory or is in%PATH%). This option cannot be specified withssh_public_key_data. - (optional)
ssh_public_key_datais the raw RSA public key data in OpenSSH format, e.g., a string starting withssh-rsa .... Only one key may be specified. This option cannot be specified withssh_public_key. - (optional)
ssh_private_keyis the path to an existing SSH private key to use against eitherssh_public_keyorssh_public_key_datafor connecting to storage nodes and performing operations that require SSH such as cluster resize and detail status. This option should only be specified if eitherssh_public_keyorssh_public_key_dataare specified. - (optional)
generated_file_export_pathis an optional path to specify for where to create the RSA public/private key pair.
- (required)
- (optional)
public_ipare public IP properties for each virtual machine.- (optional)
enableddesignates if public IPs should be assigned. The default istrue. Note that if public IP is disabled, then you must create an alternate means for accessing the storage cluster virtual machines through a "jumpbox" on the virtual network. If this property is set tofalse(disabled), then any action requiring SSH, or the SSH command itself, will occur against the private IP address of the virtual machine. - (optional)
staticis to specify if static public IPs should be assigned to each virtual machine allocated. The default isfalsewhich results in dynamic public IP addresses. A "static" FQDN will be provided per virtual machine, regardless of this setting if public IPs are enabled.
- (optional)
- (required)
virtual_networkis the virtual network to use for the storage cluster.- (required)
nameis the virtual network name - (optional)
resource_groupis the resource group for the virtual network. If this is not specified, the resource group name falls back to the resource group specified in the storage cluster or its parent. - (optional)
existing_okallows use of a pre-existing virtual network. The default isfalse. - (required if creating, optional otherwise)
address_spaceis the allowed address space for the virtual network. - (required)
subnetspecifies the subnet properties. This subnet must be exclusive to the storage cluster and cannot be shared with other resources, including Batch compute nodes. Batch compute nodes and storage clusters can co-exist on the same virtual network, but should be in separate subnets.- (required)
nameis the subnet name. - (required)
address_prefixis the subnet address prefix to use for allocation of the storage cluster file server virtual machines to.
- (required)
- (required)
- (required)
network_securitydefines the network security rules to apply to each virtual machine in the storage cluster.- (required)
sshis the rule for which address prefixes to allow for connecting to sshd port 22 on the virtual machine. In the example,"*"allows any IP address to connect. This is an array property which allows multiple address prefixes to be specified. - (optional)
nfsrule allows the NFSv4 server port to be exposed to the specified address prefix. Multiple address prefixes can be specified. This property is ignored for glusterfs clusters. - (optional)
glusterfsrule allows the various GlusterFS management and brick ports to be exposed to the specified address prefix. Multiple address prefixes can be specified. This property is ignored for nfs clusters. - (optional)
smbrule allows the the direct host SMB port to be exposed if asambaconfiguration is specified underfile_server. This requires Windows 2000 or later. Please note the name of this rule issmbwhich refers to the protocol rather than thesambaimplementation for providing this service on a non-Windows host. - (optional)
custom_inbound_rulesare custom inbound rules for other services that you need to expose.- (required)
<rule name>is the name of the rule; the example usesmyrule. Each rule name should be unique.- (required)
destination_port_rangeis the ports on each virtual machine that will be exposed. This can be a single port and should be a string. - (required)
source_address_prefixis an array of address prefixes to allow.
- (required)
- (required)
protocolis the protocol to allow. Valid values aretcp,udpand*(which means any protocol).
- (required)
- (required)
- (required)
file_serveris the file server specification.- (required)
typeis the type of file server to provision. Valid values arenfsandglusterfs.nfswill provision an NFSv4 server.glusterfswill provision a GlusterFS server. - (required)
mountpointis the path to mount the filesystem. This will also be the export path from the server for NFS. Note that with GlusterFS, if the cluster is suspended then restarted or machines are rebooted, the local gluster volume mount will not automatically mount upon boot, but will mount upon first use. This only applies to local access to the gluster volume mountpath directly on the virtual machine itself. - (optional)
mount_optionsare mount options as an array to specify when mounting the filesystem. The examples herenoatimeandnodiratimereduce file metadata updates for access times on files and directories. - (optional)
server_optionsis a key-value array of server options with the key of the file servertype.- (optional)
glusterfsare server options forglusterfsfile servertype.- (optional)
volume_nameis the name of the gluster volume. The default isgv0. - (optional)
volume_typeis the type of volume to create. If not specified, the default is the gluster default of a distributed volume. Please note that thevolume_typespecified here will have significant impact on performance and data availability delivered by GlusterFS for your workload. It is imperative to understand your data I/O and access patterns and selecting the proper volume type to maximize performance and/or availability. Although written data is durable due to managed disks, VM availability can cause reliability issues if a virtual machine fails or becomes unavailable thus resulting in unavailability of the brick hosting the data. You can view all of the available GlusterFS volume types here. - (optional)
transportis the transport type to use. The default and only valid value istcp. - (optional) Other GlusterFS tuning options can be further specified here as key-value pairs. You can find all of the tuning options here. Please note that nfs-related options for glusterfs, although they can be enabled, are not inherently supported by Batch Shipyard. Batch Shipyard automatically provisions the proper GlusterFS FUSE client on compute nodes that require access to GlusterFS-based storage clusters.
- (optional)
- (optional)
nfsare server options fornfsfile servertype. Each dictionary defined maps a host entry to the /etc/exports options for the NFS exported volume. Note that this can be omitted for the default of allowing all hosts within the Virtual Network (*) to access the share with optionsrw,sync,root_squash,no_subtree_check.- (optional)
*or any IP address or resolvable hostname. Note that*is safe to specify here assuming the defaultnetwork_securityrules are in place fornfsand you don't need to restrict access to VMs on your Virtual Network.- (optional) List of export options for this volume. Please
refer to any
/etc/exportsguide for applicable options or this link.
- (optional) List of export options for this volume. Please
refer to any
- (optional)
- (optional)
- (optional)
sambadefines properties required for enabling SMB support on storage cluster nodes. This support is accomplished by running Samba alongside the NFS or GlusterFS server software. If this section is omitted, SMB access will be disabled.- (required)
share_namename of the share. The path of this share is automatically mapped. - (optional)
accountis a user identity to mount the file share as. If this is not specified, the share will be created with guest access allowed and files and directories will be created and modified by thenobodyaccount on the server.- (required)
usernameis the username - (required)
passwordis the password for the user. This cannot be null or empty. - (required)
uidis the desired uid for the username - (required)
gidis the desired gid for the username's group
- (required)
- (optional)
read_onlydesignates that the share is read only if this property is set totrue. The default isfalse. - (optional)
create_maskis the file creation mask as an octal string. The default is"0700". - (optional)
directory_maskis the directory creation mask as an octal string. The default is"0700".
- (required)
- (required)
- (required)
vm_countis the number of virtual machines to allocate for the storage cluster. Fornfsfile servers, the only valid value is 1. pNFS is not supported at this time. Forglusterfsstorage clusters, this value must be at least 2. - (required)
vm_sizeis the virtual machine instance size to use. To attach premium managed disks, you must use a premium storage compatible virtual machine size. - (optional)
fault_domainsis the number of fault domains to configure for the availability set. This only applies tovm_count>1and must be in the range [2, 3]. The default is2if not specified. Note that some regions do not support 3 fault domains. - (optional)
accelerated_networkingenables or disables accelerated networking. The default isfalseif not specified. - (required)
vm_disk_mapis the virtual machine to managed disk mapping. The number of entries in this map must match thevm_count.- (required)
<instance number>is the virtual machine instance number. This value must be a string (although it is integral in nature).- (required)
disk_arrayis the listing of managed disk names to attach to this instance. These disks must be provisioned before creating the storage cluster. - (required)
filesystemis the filesystem to use. Valid values arebtrfs,ext4,ext3,ext2, andxfs.btrfsis generally stable for RAID-0, with many features, data integrity protection and also allows for direct RAID-0 expansion.xfsis a high performance, stable and proven option. - (optional for single disk, required for multiple disks)
raid_levelis the RAID level to apply to the disks in thedisk_array. The only valid value for multiple disks is0. At least two disks per virtual machine are required for RAID-0. Note that if you wish to expand the number of disks in the array in the future, it is strongly recommended to usebtrfsas the filesystem.
- (required)
- (required)
- (optional)
prometheusproperties are to control if collectors for metrics to export to Prometheus monitoring are enabled. Note that all exporters do not have their ports exposed to the internet by default. This means that the Prometheus instance itself must reside on, or peered with, the virtual network that the storage cluster is in. This ensures that external parties cannot scrape exporter metrics from storage cluster VMs.- (optional)
node_exportercontains options for the Node Exporter metrics exporter.- (optional)
enabledproperty enables or disables this exporter. Default isfalse. - (optional)
portis the port for Prometheus to connect to scrape. This is the internal port on the storage cluster VM. - (optional)
optionsis a list of options to pass to the node exporter instance running on all nodes. The following collectors are force disabled, in addition to others disabled by default: textfile, wifi, zfs. The nfs collector is enabled if the file server is NFS, automatically.
- (optional)
- (optional)
Please see the full guide for information on how this feature works in Batch Shipyard.
A full template of a RemoteFS configuration file can be found here. Note that these templates cannot be used as-is and must be modified to fit your scenario.
Sample recipes for both NFS and GlusterFS can be found in the recipes area.