Commit graph

242 commits

Author SHA1 Message Date
Leif Johansson d604d2fab5
set no-protection on the private key 2023-01-30 12:07:33 +01:00
Micke Nordin 3234cc59e3
Merge pull request #25 from theseal/fix-etc-hosts
Don't confuse containers to connect to them self
2023-01-30 11:31:00 +01:00
Micke Nordin 64c12216bd
Merge pull request #28 from theseal/only-update-db-when-needed
Only update the database when needed
2023-01-30 11:30:21 +01:00
Johan Wassberg 57b302a299
Only update the database when needed
Without this fix:
```
➜  nunoc-ops git:(master) make db
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
make: *** [db] Error 1
```

With this fix:
```
➜  swamid-ops git:(master) ✗ make db
make: Nothing to be done for `db'.
```

Will make it easier to only use `make tag` when to sign changes.
2023-01-30 11:21:01 +01:00
Fredrik Thulin 92c76f4f3f
Merge pull request #27 from SUNET/kano-setup-cosmos-modules-example
Add example setup_cosmos_modules script
2023-01-27 10:36:37 +01:00
Micke Nordin bb62889454
Move example script to docs 2023-01-27 10:34:59 +01:00
Micke Nordin 2e0ccdd92d
Add example setup_cosmos_modules script
This patch adds an example script written in python to help people get
started with writing their own implementation. The docs are also
updated.
2023-01-26 09:53:36 +01:00
Fredrik Thulin 73f3626176
Merge pull request #26 from eest/patlu-iaas-missing-default-user 2023-01-26 09:06:39 +01:00
Patrik Lundin f1ab4506f1
iaas-setup.sh: support default user not existing
For CNaaS machines we supply cloud-init user-data that does not create a
default user, in this case the script would exit half-way through. Now
it only tries to remove a user if it exists in the first place.
2023-01-26 08:45:04 +01:00
Johan Wassberg bc17ee1354
Don't confuse containers to connect to them self
When the hostname pointed to loopback the containers tried to connect to them
self instead of the host.
2023-01-24 10:01:59 +01:00
Micke Nordin 714506da1e
Merge pull request #24 from SUNET/ft-dynamic_cosmos_modules
Allow dynamically generated /etc/puppet/cosmos-modules.conf.
2023-01-19 18:32:21 +01:00
Micke Nordin 192e7b77b5
Merge pull request #23 from SUNET/ft-test_in_docker
add script and Makefile target to test multiverse in a docker container
2023-01-19 18:26:53 +01:00
Fredrik Thulin 715105aadb
add documentation for dynamically generated cosmos-modules.conf 2023-01-19 17:56:51 +01:00
Fredrik Thulin 906e483c53
speling 2023-01-19 17:46:23 +01:00
Fredrik Thulin c3c6171f96
modules, not models 2023-01-19 17:30:18 +01:00
Fredrik Thulin e2e394a9af
generate /etc/puppet/cosmos-modules.conf dynamically 2023-01-19 17:19:42 +01:00
Fredrik Thulin 187e3bc9be
add script and Makefile target to test multiverse in a docker container 2023-01-19 17:18:04 +01:00
Fredrik Thulin 44f4fb6620
Merge pull request #22 from eest/backport-edit-secrets-from-cnaas-ops
Backport edit secrets from cnaas ops
2023-01-18 14:32:30 +01:00
Patrik Lundin a7d0a189da
Work around broken hiera-eyaml on 22.04
This can be removed once the linked bug report is solved.

Idea from, and implementation reviewed by, @fredrikt
2023-01-18 14:27:25 +01:00
Kristofer Hallin d12f6297ed
Support Ubuntu 20 as well for edit-secrets. 2023-01-18 14:27:06 +01:00
Fredrik Thulin c8451c2122
copy edit-secrets from eduid-ops 2023-01-18 14:26:40 +01:00
Gijutsu aa115ce052
Merge pull request #19 from theseal/master
Use puppet that comes with OS
2023-01-17 14:09:21 +01:00
Johan Wassberg fb4849a0df
Use puppet that comes with OS
nunoc-ops does like this since 2018 so I think it will fly.

Also the package `puppet` seems to been around since at-least Ubuntu 14.04.
2023-01-17 13:53:13 +01:00
Fredrik Thulin 46aecacb06
Merge pull request #18 from eest/cosmos-set-root-perms
Make overlay permission script global
2022-12-05 15:08:49 +01:00
Patrik Lundin 68d0083557
Make overlay permission script global
This will make sure /root has proper permissions on our machines.
2022-12-05 15:02:37 +01:00
Fredrik Thulin b454cd52ba
Merge pull request #17 from eest/patlu-handle-multiple-versions-of-cosmos-deb 2022-11-15 18:54:39 +01:00
Patrik Lundin 3ef4e47ff6
Handle multiple versions of cosmos .deb
Before this change there was a need to keep addhost and
bootstrap-cosmos.sh in sync regarding what version of the cosmos deb to
scp over and later run.

Now we find the latest version as decided by `sort -V` in both addhost
and bootstrap-cosmos.sh.

Solution discussed with @fredrikt.
2022-11-15 18:26:36 +01:00
Fredrik Thulin 7012bf0342
Merge pull request #16 from eest/patlu-sync-ubuntu-with-prepare-iaas-debian 2022-11-15 07:56:30 +01:00
Leif Johansson 4c6623f128
Merge pull request #15 from eest/backport-nunoc-ops
Backport nunoc ops
2022-11-14 14:09:52 +01:00
Patrik Lundin 16a6a67fd1
Make debian iaas prepare scripts handle ubuntu
Now ubuntu also uses the updated way of preparing iaas instances like
debian did before, actually the debian scripts have been remade to also
handle ubuntu so we use a common code path.

Usage (what scripts to call) stay the same, but the underlying
operations takes less logins to complete.
2022-11-14 12:54:08 +01:00
Patrik Lundin 020b8fe34c
Enable "set -e" again
Good idea to fail when unexpected things go wrong. Additional fixes
added to the script to not stop where we can expect a non-zero return
code.

Requested by @fredrikt who also reviewed the patch before going in,
thanks!
2022-10-12 16:47:20 +02:00
Patrik Lundin c55e5535a2
Add gpg to cosmos bootstrap script
Without this Debian 11 fails to bootstrap:
```
/etc/cosmos/gpg.d/50gpg: 36: gpg: not found
```
2022-10-10 17:27:15 +02:00
Linus Nordberg 0692cabba3
Remove that '.novalocal' line in /etc/hosts, added by cloud-init
It messes up `hostname -f` on Debian, even if there's a correct line
further down in /etc/hosts.
2022-10-10 17:26:56 +02:00
John Van de Meulebrouck Brendgard 3b80ba32c7
Set manage_etc_hosts to false for cloudimage based hosts
this is needed so that our changes in /etc/hosts
are not overwritten.
2022-10-10 17:26:45 +02:00
Fredrik Thulin b2272d409f
free-hand updates from eduid-ops 2022-10-10 17:26:18 +02:00
Leif Johansson 19304f2d79
short hostname i /etc/hosts 2022-10-10 17:23:39 +02:00
Leif Johansson 378dfe04fa
try very hard to find git 2022-10-10 17:23:23 +02:00
Leif Johansson 7f0c457a33
try very hard to find git 2022-10-10 17:22:56 +02:00
Leif Johansson 87e49a541f
safe update & upgrade 2022-10-10 17:19:34 +02:00
Fredrik Thulin 6c621aa5f1
Merge pull request #14 from eest/rework-prepare-iaas-debian
Rework prepare-iaas-debian
2022-10-10 16:52:15 +02:00
Patrik Lundin 300c4283af
Rework prepare-iaas-debian
* Log in as few times as possible to not require a lot if yubikey
  keypresses
* Make sure en_US.UTF-8 is present
* Replace `rm -rf` with userdel command
* Make sure the debian account is actually deleted
* Remove locale related warnings when running script from macOS
2022-10-10 16:17:20 +02:00
Fredrik Thulin 42f674edb3
speling 2022-04-14 12:35:26 +02:00
Fredrik Thulin 7323626efe
cleanups, and install cosmos_1.5-2~sunet20220414_all.deb
- shellcheck fixes
- rewrite argument parsing
- install new version of cosmos (cosmos_1.5-2~sunet20220414_all.deb)
2022-04-14 12:31:27 +02:00
Fredrik Thulin d033b58909
init, new version with better git update and signature validation 2022-04-14 12:22:44 +02:00
Leif Johansson 375a06276c
Merge pull request #11 from SUNET/ft-fix_package_manager
init, from eduid-ops
2019-04-04 23:01:39 +02:00
Fredrik Thulin b5d538ece1
init, from eduid-ops 2019-04-04 14:59:36 +02:00
John Van de Meulebrouck Brendgard 61d1c1c9b7
Merge branch 'ft-gpg_no_tty' 2019-03-17 16:40:34 +01:00
Fredrik Thulin 7c5a063045
gpg import with --no-tty
With recent GPG versions, a TTY seems to be required to import keys.

Since importing of keys need to work when running from cron, we
pass --no-tty to those commands. This should mean that -t doesn't
have to be passed to SSH on bootstrapping for new Debian hosts
(tested on Raspbian).
2019-03-17 13:26:54 +01:00
Leif Johansson de49b194d0
Merge pull request #9 from SUNET/gijutsu-support-debian
Force pseudo-terminal when running addhost
2019-03-07 21:58:51 +01:00
Leif Johansson d8cc0aa331
Merge pull request #5 from pettai/more-puppet-debs
Add more puppet debs
2019-02-18 16:55:21 +01:00