Skip to content

Commit

Permalink
renamed volumeSize to bootVolumeSize to avoid name issues
Browse files Browse the repository at this point in the history
  • Loading branch information
XaverStiensmeier committed Sep 27, 2024
1 parent 7bdb8f0 commit 9b2814a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions bibigrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# bootFromVolume: False
# terminateBootVolume: True
# volumeSize: 50
# bootVolumeSize: 50

# waitForServices: # existing service name that runs after an instance is launched. BiBiGrid's playbook will wait until service is "stopped" to avoid issues
# - de.NBI_Bielefeld_environment.service # uncomment for cloud site Bielefeld
Expand All @@ -67,7 +67,7 @@
# bootVolume: None
# bootFromVolume: True
# terminateBootVolume: True
# volumeSize: 50
# bootVolumeSize: 50

# -- END: GENERAL CLUSTER INFORMATION --

Expand All @@ -83,7 +83,7 @@
# # bootVolume: None
# # bootFromVolume: True
# # terminateBootVolume: True
# # volumeSize: 50
# # bootVolumeSize: 50

# Depends on cloud image
sshUser: # for example ubuntu
Expand Down
5 changes: 3 additions & 2 deletions bibigrid/core/actions/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def generate_security_groups(self):
_ = provider.create_security_group(name=self.wireguard_security_group_name)["id"]
configuration["security_groups"].append(self.wireguard_security_group_name) # store in configuration

def start_vpn_or_master(self, configuration, provider): # pylint: disable=too-many-locals
def start_vpn_or_master(self, configuration, provider): # pylint: disable=too-many-locals
"""
Start master/vpn-worker of a provider
@param configuration: dict configuration of said provider.
Expand Down Expand Up @@ -205,7 +205,8 @@ def start_vpn_or_master(self, configuration, provider): # pylint: disable=too-ma
terminate_boot_volume=instance.get("terminateBootVolume",
configuration.get("terminateBootVolume",
True)),
volume_size=instance.get("volumeSize", configuration.get("volumeSize", 50)))
volume_size=instance.get("bootVolumeSize",
configuration.get("bootVolumeSize", 50)))
configuration["private_v4"] = server["private_v4"]
self.log.debug(f"Created Server {name}: {server['private_v4']}.")
# get mac address for given private address
Expand Down
8 changes: 4 additions & 4 deletions bibigrid/core/utility/validate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
WORKER = {'type': str, 'image': str, Optional('count'): int, Optional('onDemand'): bool, Optional('partitions'): [str],
Optional('features'): [str],
Optional('bootVolume'): str,
Optional('bootFromVolume'): bool, Optional('terminateBootVolume'): bool, Optional('volumeSize'): int,
Optional('bootFromVolume'): bool, Optional('terminateBootVolume'): bool, Optional('bootVolumeSize'): int,
}
MASTER = VPN = {'type': str, 'image': str, Optional('onDemand'): bool, Optional('partitions'): [str],
Optional('features'): [str],
Optional('bootVolume'): str,
Optional('bootFromVolume'): bool, Optional('terminateBootVolume'): bool, Optional('volumeSize'): int,
Optional('bootFromVolume'): bool, Optional('terminateBootVolume'): bool, Optional('bootVolumeSize'): int,
}

# Define the schema for the configuration file
Expand All @@ -32,15 +32,15 @@
Optional('TreeWidth'): int}},
Optional('zabbix'): bool, Optional('nfs'): bool, Optional('ide'): bool, Optional('useMasterAsCompute'): bool,
Optional('useMasterWithPublicIp'): bool, Optional('waitForServices'): [str], Optional('bootVolume'): str,
Optional('bootFromVolume'): bool, Optional('terminateBootVolume'): bool, Optional('volumeSize'): int,
Optional('bootFromVolume'): bool, Optional('terminateBootVolume'): bool, Optional('bootVolumeSize'): int,
Optional('gateway'): {'ip': str, 'portFunction': str}, Optional('dontUploadCredentials'): bool,
Optional('fallbackOnOtherImage'): bool,
Optional('localDNSLookup'): bool, Optional('features'): [str], 'workerInstances': [
WORKER],
'masterInstance': MASTER,
Optional('vpngtw'): {'type': str, 'image': str},
Optional('bootVolume'): str,
Optional('bootFromVolume'): bool, Optional('terminateBootVolume'): bool, Optional('volumeSize'): int
Optional('bootFromVolume'): bool, Optional('terminateBootVolume'): bool, Optional('bootVolumeSize'): int
})

other_schema = Schema(
Expand Down
8 changes: 4 additions & 4 deletions documentation/markdown/features/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ workerInstance:
bootVolume: False
bootFromVolume: True
terminateBootVolume: True
volumeSize: 50
bootVolumeSize: 50
```

- `type` sets the instance's hardware configuration.
Expand All @@ -278,7 +278,7 @@ workerInstance:
- `bootVolume` (optional:None) takes name or id of a boot volume and boots from that volume if given.
- `bootFromVolume` (optional:False) if True, the instance will boot from a volume created for this purpose.
- `terminateBootVolume` (optional:True) if True, the boot volume will be terminated when the server is terminated.
- `volumeSize` (optional:50) if a boot volume is created, this sets its size.
- `bootVolumeSize` (optional:50) if a boot volume is created, this sets its size.

##### Find your active `images`

Expand Down Expand Up @@ -319,7 +319,7 @@ Only in the first configuration and only one:
bootVolume: False
bootFromVolume: True
terminateBootVolume: False
volumeSize: 50
bootVolumeSize: 50
```

You can create features for the master [in the same way](#features-optional) as for the workers:
Expand Down Expand Up @@ -382,7 +382,7 @@ If True, the instance will boot from a volume created for this purpose. Keep in
to multiple boots of the same configurated node. If you don't make use of [terminateBootVolume](#terminatebootvolume-optionaltrue)
this will lead to many created volumes.

#### volumeSize (optional:50)
#### bootVolumeSize (optional:50)
The created volume's size if you use [bootFromVolume](#bootfromvolume-optionalfalse).

#### terminateBootVolume (optional:True)
Expand Down

0 comments on commit 9b2814a

Please sign in to comment.