Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemric committed Nov 24, 2023
1 parent 6af25d8 commit c7b2210
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pipeline {
stage("Getting CoreOS artefacts") {
steps {
sh '''
./Update.sh --stream $STREAM --arch $ARCH --artifact $ARTIFACT --format $FORMAT --verbose true
./Update.sh --stream $STREAM --arch $ARCH --artifact $ARTIFACT --format $FORMAT --history $ARTEFACTS_VERSIONS --verbose true
'''
}
}
Expand Down
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Update-CoreOS

First of all, I'm used to consider containers as disposable ! What about OSes ? They are disposable to !
That's why I'm using [Fedora CoreOS](https://getfedora.org/fr/coreos?stream=stable), an immutable OS absolutly disposable : Only datas are important !

So, I'm used to boot CoreOS from a PXE/TFTP server, and to use containerized apps to deal with datas without installing anything !

Let me describe this **WIP** repo ...

## Update.sh

**dependency** : You must have [`jq`](https://jqlang.github.io/jq/) installed

A simple bash script, that relatively fit the need, that allow to download CoreOS artefacts.
This script was firstly intended to manually download `x86_64/metal/pxe` artefacts for my home lab (defaults option values)
I ended to make it more "agnostic" and "automation fitted" to allow downloading needed artefacts (with options)

Options are, space delimited : (e.g.: `./Update.sh -v true`)

- `-s` or `--stream` usually: stable, testing or next -> défault : `stable`
- `-a` or `--arch` usually: aarch64, ppc64le, s390x, x86_64 -> default: `x86_64`
- `-t` or `--artifact` ouch ! aliyun, aws, azure, azurestack, digitalocean, exoscale, gcp, hyperv, ibmcloud, kubevirt, metal, nutanix, openstack, qemu, irtualbox, vmware, vultr... and so on depending previous choices -> default : `metal`
- `-f` or `--format`Arrgh ! Really depending of previous choices -> default : `pxe`
- `-v` or `--verbose` If ever you want to see well formatted json output -> default : `false`
- `-h` or `--history`default file path to `coreos.json` that must at least contains `{}`data, there's no error check for this option !

It will ouput artefacts, GPG and SHASUM checked, and a file named as `$format.$artifact.$arch.$stream` that contains the list of downloaded files for later use .. or not
`coreos.json`/`--history` file will be updated with version number from released/downloaded artefacts to remember last updates

## Jenkinsfile

The "end user" of `Update.sh` :

- Will get gpg keys from [fedora project](https://fedoraproject.org/fedora.gpg) as other things.
- Will get latest history file from artefact server (the PXE/TFTP server)
- Will `matrix` `Update.sh` options in order to use it and ...
- Will get downloads from `Update.sh` and upload them to PXE/TFTP server via ssh
- And save `--history` file to keep in memory of latest downloaded artefacts versions

## coreos.json

The f**g empty template of all things ! that's all we need to know :relaxed:

## TODO

send reboot cmd to servers that depend on PXE artefacts
3 changes: 2 additions & 1 deletion Update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ then
else
rm $filename $filename.sig
fi
failed=true

if [ try == 2 ]; then failed=true; fi;

done
done
Expand Down

0 comments on commit c7b2210

Please sign in to comment.