Gabriel Adrian Samfira
9e18d5d7a9
Add build target to Makefile
...
Add a build target to the Makefile that allows building a non static
version if both garm and garm-cli. This is useful when you just need to
build the binaries locally and make sure the version is properly set.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 23:47:36 +03:00
Gabriel Adrian Samfira
9ed9e9eec5
Add retries for curl calls
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 22:37:20 +03:00
Gabriel Adrian Samfira
08bf2bf5a1
Make spacing consistent & add some status updates
...
Convert the templates.go file to contain tabs instead of spaces
consistently.
Add some status messages when installing.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 21:27:49 +03:00
Gabriel Adrian Samfira
0e637c10e3
Remove failed runner and some retries
...
* When a runner fails to set up the github agent, we reap it after the
pool timeout is reached.
* add a retry in the userdata when configuring the runner agent
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 21:01:40 +03:00
Gabriel Adrian Samfira
636164fb18
Exclude a temp cmd used for testing
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 13:24:00 +03:00
Gabriel
a42ad39264
Merge pull request #103 from HippocampusGirl/lxd-extra-packages
...
Allow installing additional packages in lxd container
2023-06-11 18:57:24 +03:00
Lea Waller
e3065d6951
Allow installing additional packages in lxd
2023-06-11 17:32:30 +02:00
Gabriel
d56858a599
Merge pull request #102 from gabriel-samfira/validate-provider-responses
...
Validate provider responses
2023-06-11 15:13:03 +03:00
Gabriel Adrian Samfira
06745eb88a
Validate the result returned by providers
...
Providers may return only 3 possible statuses:
* InstanceRunning
* InstanceError
* InstanceStopped
Every other status is reserved for the controller to set. Provider
responses will be split from the instance response in a future commit.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-11 15:02:36 +03:00
Gabriel Adrian Samfira
e6a4137e3b
properly set version
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-08 18:07:35 +03:00
Gabriel
dd1569a8da
Merge pull request #101 from gabriel-samfira/do-not-merge-second-column
...
Don't merge the second column in the CLI
2023-06-08 14:16:14 +03:00
Gabriel Adrian Samfira
66dc18c3ff
Don't merge the second column in the CLI
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-08 13:57:08 +03:00
Gabriel
b46d7eb6fe
Merge pull request #97 from gabriel-samfira/lxd-add-timeouts
...
Parallelization and LXD timeouts
2023-06-08 13:42:47 +03:00
Gabriel
e3bcee89a4
Merge pull request #98 from mihaelabalutoiu/add_db_users_unit_tests
...
Add `users.go` unit tests
2023-06-07 12:55:44 +03:00
Mihaela Balutoiu
a25991ee2f
Add users.go unit tests
...
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-06-07 12:46:47 +03:00
Gabriel
65c86c96f0
Merge pull request #99 from ionutbalutoiu/fix-makefile-typo
...
Fix Makefile typo
2023-06-07 10:10:11 +03:00
Ionut Balutoiu
38d3b6100b
Fix Makefile typo
...
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-06-07 10:01:03 +03:00
Gabriel Adrian Samfira
d8ed55288f
Small comment change
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 14:55:08 +00:00
Gabriel Adrian Samfira
829933559d
Allow installing runners to finish
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 14:49:28 +00:00
Gabriel Adrian Samfira
bd2f103743
Wait for addPendingInstances to finish
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 16:40:27 +03:00
Gabriel Adrian Samfira
e9f66c2035
Wait for deletePendingInstances() to finish
...
Use an errgroup to wait for all instance deletion operations before
returning. Log any failure.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 16:36:08 +03:00
Gabriel Adrian Samfira
05a79d298c
Move some code around
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 16:31:30 +03:00
Gabriel Adrian Samfira
9efefc0d6a
Parallelization and LXD timeouts
...
* cleanupOrphanedGithubRunners() now uses errgroup to parallelize and
report errors when removing runners from the provider.
* retryFailedInstancesForOnePool() now uses errgroup
* Removed some setPoolRunningState which should be treated in the loop
where those errors eventually bubble up and can be handled.
* Added a number of timeouts in the LXD provider for delete and list
instances. This provider should be converted into an external
provider.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 16:07:07 +03:00
Gabriel
aee4eb24b2
Merge pull request #95 from gabriel-samfira/lxd-disable-updates
...
Allow disabling updates
2023-06-05 01:35:26 +03:00
Gabriel Adrian Samfira
88a39220f5
Allow disabling updates
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 22:28:50 +00:00
Gabriel
524ed99950
Merge pull request #94 from gabriel-samfira/lxd-set-image-expiration
...
Let CreateInstance download and cache image
2023-06-05 01:03:49 +03:00
Gabriel Adrian Samfira
06d2e6f6cd
Send a fail status if chcon fails
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 21:50:49 +00:00
Gabriel Adrian Samfira
19118008b1
Properly set security context
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 21:47:34 +00:00
Gabriel Adrian Samfira
132823b453
Let CreateInstance download and cache image
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 21:20:22 +00:00
Gabriel
9d200d5352
Merge pull request #92 from gabriel-samfira/fix-lxd-list-instances
...
Fix pool ID check when listing instances
2023-06-04 15:44:46 +03:00
Gabriel Adrian Samfira
234095e456
Fix pool ID check when listing instances
...
We should be looking for the poolIDKey in the extended LXD config.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 15:43:03 +03:00
Gabriel
fdfcc619ad
Merge pull request #87 from mercedes-benz/userdata-options
...
Add Userdata options to disable package update during boot / cloud-init
2023-04-19 12:29:15 +02:00
Michael Kuhnt
535c875eb8
add userdata options to allow disabling package updates during boot / cloud-init
2023-04-19 11:40:51 +02:00
Michael Kuhnt
37c8af0fb1
formatting stuff
2023-04-19 11:39:55 +02:00
Gabriel
690db913c3
Merge pull request #84 from mercedes-benz/skip-runner-install
...
check if runner needs to be installed
2023-04-19 11:01:07 +02:00
Michael Kuhnt
7719f4e54c
remove insecure flag in curl
2023-04-18 18:32:43 +02:00
Michael Kuhnt
759c43cdd7
add possibility to cache action-runner versions
2023-04-18 18:31:35 +02:00
Michael Kuhnt
35312972cb
check if runner needs to be installed
2023-04-12 14:51:23 +02:00
Gabriel Adrian Samfira
385503f06c
Update docs
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-04-07 00:06:18 +03:00
Gabriel Adrian Samfira
13ac528ae3
Fix tests
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-31 15:03:08 +00:00
Gabriel Adrian Samfira
a433bede96
Return only enabled pools
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-31 14:47:27 +00:00
Gabriel Adrian Samfira
2ebd95977f
Limit width in pool view to 100 characters
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-31 07:44:23 +00:00
Gabriel Adrian Samfira
6d4f297097
Fix error type passed into errors.As
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-31 04:36:16 +00:00
Gabriel Adrian Samfira
702937f636
Add github runner group in pool show
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-30 09:00:46 +00:00
Gabriel Adrian Samfira
4c906d5f5b
Fix typo in userdata
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-28 14:26:28 +00:00
Gabriel
569803e5e6
Merge pull request #82 from gabriel-samfira/add-execution-env
...
Add aditional external provider enablement
2023-03-28 12:52:37 +03:00
Gabriel Adrian Samfira
243ae75476
Properly handle stopped runners
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-27 15:02:25 +00:00
Gabriel Adrian Samfira
6b3ea50ca5
Add runner group option to pools
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-27 09:21:21 +00:00
Gabriel Adrian Samfira
80e8f6dc1e
Add some exit codes
...
The external provider needs a simple way to indicate certain types of
errors. Duplicate error and not found error are such an example.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-26 22:31:55 +03:00
Gabriel Adrian Samfira
e7f208367b
Error if we can't remove instance from provider
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-26 22:19:20 +03:00