Commit graph

24 commits

Author SHA1 Message Date
isaac-hammes
cbec1d9d3a (maint) Update to jruby-9.4.1.0 and move socket timeout to new method. 2023-03-02 12:02:42 -08:00
Samuel Beaulieu
26327210a4
Added a check for failed create attempts, they are now retried up to 30 times 2022-07-27 12:24:45 -05:00
Samuel Beaulieu
2a39a8cf06
fix rubocop offences and spec tests 2022-07-27 09:31:24 -05:00
Samuel Beaulieu
79516d8014
(maint) Refactor cloud dns
Moved the creation and deletion methods to a vmpooler class, to be used by the ec2
provisioner.
Added a check for failed deletion attempts, they are now retried up to 30 times
2022-07-26 16:20:48 -05:00
Samuel Beaulieu
39d6d0d849
temp disable a rubocop check 2022-06-17 09:04:37 -05:00
Samuel Beaulieu
e06917dd92
(DIO-3162) vmpooler gce provider to support disk type (to use ssd)
Added a new pool config named disk_type, which can be set to pd-ssd to
use a SSD disk attahed to the instance. When not set, or set to empty,
the google default of pd-standard is used
2022-06-16 09:44:37 -05:00
Jake Spain
b62580df0a
Set hostname for instance during create_vm
This sets the instance hostname to the configured domain according to https://cloud.google.com/compute/docs/instances/custom-hostname-vm#api and https://googleapis.dev/ruby/google-api-client/latest/Google/Apis/ComputeV1/Instance.html#hostname-instance_method
2022-04-15 08:28:08 -04:00
Samuel Beaulieu
e3119758b4
fix rubocop offence 2022-01-10 10:43:53 -06:00
Samuel Beaulieu
83770acd89
fix dns_setup as zone was already a method
also changed from setting the project name in the instance labels to a
instance tag aka network tag, as the setup for allowing traffic in the FW
is bassed on tag not label
2022-01-06 16:39:53 -06:00
Samuel Beaulieu
2cb2550aca
refactor dns_zone to be renamed domain to match the global parameter being overwritten
in the upstream vmpooler code, we use the global domain parameter, so naming that parameter
the same in GCE. This parameter can be optionally set in the provider config, and
overwrites the global parameter. It is used to infer the FQDN as .
2021-12-31 10:30:18 -06:00
Samuel Beaulieu
b66218dc10
replace dns zone entry if it already exists
on the rare occasion where adding a dns record and we get teh error it already exists
assume that it is stale and replace it with the new IP
2021-12-31 09:35:29 -06:00
Samuel Beaulieu
0beec3d8e9
code review fixes 2021-12-29 12:17:25 -06:00
Samuel Beaulieu
a4c730df7b
fix rubocop and spec tests 2021-12-29 12:02:55 -06:00
Samuel Beaulieu
daa55fe5b8
Adding the cloud DNS API library and related methods
we setup DNS when a VM is created and tear it down when a VM is deleted
the DNS zone should exist already and is referenced by a provider setting
the dns zone is also set in order to use it for vm_ready? instead of the global
domain
instances have a label that identifies which project they belong to, so
it can be used for FW rules
2021-12-29 08:21:51 -06:00
Samuel Beaulieu
5c67073dad
rubocop fixes 2021-12-09 18:43:36 -06:00
Samuel Beaulieu
662f965c0f
refactor the connection and add debug logs 2021-12-09 17:59:15 -06:00
Samuel Beaulieu
8594160fbe
Implementing the tag_vm_user method
This method gets the user name based on the token:user metadata in redis,
cleans it up to be safe for a label name (lowercase, numbers and dash or underscore only),
and update the existing instance labels adding a new one called token-user
2021-12-09 11:35:29 -06:00
Samuel Beaulieu
f6791baba0
Adding support for fully qualified allow list eg user=bob
before thhis change the allow list would only support checking the 'pool' label value
we can now specify a different label name by using the format labename=value where
the equal sign '=' is considered the separator
2021-12-09 11:33:10 -06:00
Samuel Beaulieu
fc7a628063
spec the purge method and align it with the new base method signature 2021-12-08 10:33:25 -06:00
Samuel Beaulieu
761c96fd38
adding purge unconfigured method 2021-12-07 13:08:21 -06:00
Samuel Beaulieu
c85fed771f
improve revert_snapshot method 2021-12-07 12:12:55 -06:00
Samuel Beaulieu
2a0e9f5bdc
adding spec tests 2021-12-07 08:41:55 -06:00
Samuel Beaulieu
b631570871
adding create_disk and create_snapshot method implementation 2021-12-03 13:31:04 -06:00
Samuel Beaulieu
588e29b6e1
(DIO-2768) Initial gce provider 2021-12-02 14:27:31 -06:00