First
This commit is contained in:
parent
00e6636813
commit
2dff593d56
27
README.md
27
README.md
@ -1 +1,26 @@
|
||||
# rockylinux-ostree
|
||||
# Rocky Linux Ostree
|
||||
This repository contains all the bits to get a working Ostree for Rocky Linux (8.6)
|
||||
|
||||
## Dir: bootserver
|
||||
Contains an Ansible playbook to configure a PXE bootserver
|
||||
|
||||
## Dir: ostree-config
|
||||
Contains the config files to build a basic Ostree for Rocky Linux
|
||||
|
||||
# How to use
|
||||
From the root directory of this project:
|
||||
* Create a build directory with the repo and cache directory below it. The repo directory will have the final OStree repository where you could boot from.
|
||||
* Initialize the ./build/repo directory as a OStree repository
|
||||
* Build the OStree repo
|
||||
|
||||
```
|
||||
mkdir -p ./build/{repo,cache}
|
||||
ostree --repo=./build/repo init --mode=archive
|
||||
sudo rpm-ostree --unified-core compose tree --cachedir=./build/cache --repo=./build/repo config/manifest.yaml
|
||||
```
|
||||
|
||||
When the compose state is finished, rsync the repo to the bootserver and network boot from it.
|
||||
|
||||
```
|
||||
sudo rsync -av --delete ./build/repo root@192.168.122.89:/var/www/html/ostree/
|
||||
```
|
12
build.sh
Executable file
12
build.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
Error () {
|
||||
echo "Oops, something did not work"
|
||||
exit 101
|
||||
}
|
||||
|
||||
sudo rm -rf ./build || Error
|
||||
mkdir -p ./build/{repo,cache} || Error
|
||||
ostree --repo=build/repo init --mode=archive || Error
|
||||
sudo rpm-ostree --unified-core compose tree --cachedir=./build/cache --repo=./build/repo config/manifest.yaml || Error
|
||||
sudo rsync -av --delete ./build/repo root@192.168.122.89:/var/www/html/ostree/ || Error
|
20
commands.txt
Normal file
20
commands.txt
Normal file
@ -0,0 +1,20 @@
|
||||
mkdir -p build/repo
|
||||
cd build/
|
||||
ostree --repo=repo init --mode=archive
|
||||
sudo rpm-ostree compose tree --cachedir=/home/richard/rocky-coreos/build/cache --repo=/home/richard/rocky-coreos/build/repo config/manifest.yaml
|
||||
sudo tar cvzf repo.tar.gz build/repo
|
||||
scp repo.tar.gz root@192.168.122.89:
|
||||
|
||||
|
||||
# 2de keer
|
||||
mkdir -p build/{repo,cache}
|
||||
ostree --repo=build/repo init --mode=archive
|
||||
sudo rpm-ostree compose tree --cachedir=/home/richard/rocky-coreos/build/cache --repo=/home/richard/rocky-coreos/build/repo config/manifest.yaml
|
||||
|
||||
|
||||
####
|
||||
ostree --repo=./build/repo ls rocky/x86_64/coreos
|
||||
ostree --repo=./build/repo ls rocky/x86_64/coreos /etc
|
||||
ostree --repo=./build/repo cat rocky/x86_64/coreos /usr/etc/passwd
|
||||
ostree --repo=./build/repo ls rocky/x86_64/coreos /usr/lib/systemd/system/*get*
|
||||
sudo rsync -av --delete /home/richard/rocky-coreos/build/repo root@192.168.122.89:/var/www/html/ostree/
|
16
ostree-config/manifest.yaml
Normal file
16
ostree-config/manifest.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
ref: rocky/${basearch}/coreos
|
||||
rojig:
|
||||
name: rocky-coreos
|
||||
summary: "Rocky Linux CoreOS"
|
||||
license: MIT
|
||||
packages:
|
||||
- rocky-release
|
||||
|
||||
repos:
|
||||
- rocky-86-baseos
|
||||
- rocky-86-appstream
|
||||
|
||||
include:
|
||||
- manifests/rocky-coreos-base.yaml
|
||||
- manifests/rocky-coreos-system_tools.yaml
|
||||
- manifests/rocky-coreos-post.yaml
|
52
ostree-config/manifests/group
Normal file
52
ostree-config/manifests/group
Normal file
@ -0,0 +1,52 @@
|
||||
root:x:0:
|
||||
bin:x:1:
|
||||
daemon:x:2:
|
||||
sys:x:3:
|
||||
adm:x:4:
|
||||
tty:x:5:
|
||||
disk:x:6:
|
||||
lp:x:7:
|
||||
mem:x:8:
|
||||
kmem:x:9:
|
||||
wheel:x:10:
|
||||
cdrom:x:11:
|
||||
mail:x:12:
|
||||
man:x:15:
|
||||
sudo:x:16:
|
||||
dialout:x:18:
|
||||
floppy:x:19:
|
||||
games:x:20:
|
||||
tape:x:30:
|
||||
video:x:39:
|
||||
ftp:x:50:
|
||||
lock:x:54:
|
||||
audio:x:63:
|
||||
nobody:x:99:
|
||||
users:x:100:
|
||||
utmp:x:22:
|
||||
utempter:x:35:
|
||||
ssh_keys:x:999:
|
||||
systemd-journal:x:190:
|
||||
dbus:x:81:
|
||||
polkitd:x:998:
|
||||
etcd:x:997:
|
||||
dip:x:40:
|
||||
cgred:x:996:
|
||||
tss:x:59:
|
||||
avahi-autoipd:x:170:
|
||||
rpc:x:32:
|
||||
sssd:x:993:
|
||||
dockerroot:x:986:
|
||||
rpcuser:x:29:
|
||||
nfsnobody:x:65534:
|
||||
kube:x:994:
|
||||
sshd:x:74:
|
||||
chrony:x:992:
|
||||
tcpdump:x:72:
|
||||
ceph:x:167:
|
||||
input:x:995:
|
||||
systemd-timesync:x:991:
|
||||
systemd-network:x:990:
|
||||
systemd-resolve:x:989:
|
||||
systemd-bus-proxy:x:988:
|
||||
cockpit-ws:x:987:
|
33
ostree-config/manifests/passwd
Normal file
33
ostree-config/manifests/passwd
Normal file
@ -0,0 +1,33 @@
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
bin:x:1:1:bin:/bin:/sbin/nologin
|
||||
daemon:x:2:2:daemon:/sbin:/sbin/nologin
|
||||
adm:x:3:4:adm:/var/adm:/sbin/nologin
|
||||
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
|
||||
sync:x:5:0:sync:/sbin:/bin/sync
|
||||
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
|
||||
halt:x:7:0:halt:/sbin:/sbin/halt
|
||||
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
|
||||
operator:x:11:0:operator:/root:/sbin/nologin
|
||||
games:x:12:100:games:/usr/games:/sbin/nologin
|
||||
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
|
||||
nobody:x:99:99:Nobody:/:/sbin/nologin
|
||||
dbus:x:81:81:System message bus:/:/sbin/nologin
|
||||
polkitd:x:999:998:User for polkitd:/:/sbin/nologin
|
||||
etcd:x:998:997:etcd user:/var/lib/etcd:/sbin/nologin
|
||||
tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin
|
||||
avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin
|
||||
rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
|
||||
sssd:x:995:993:User for sssd:/:/sbin/nologin
|
||||
dockerroot:x:997:986:Docker User:/var/lib/docker:/sbin/nologin
|
||||
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
|
||||
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
|
||||
kube:x:996:994:Kubernetes user:/:/sbin/nologin
|
||||
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
|
||||
chrony:x:994:992::/var/lib/chrony:/sbin/nologin
|
||||
tcpdump:x:72:72::/:/sbin/nologin
|
||||
ceph:x:167:167:Ceph daemons:/var/lib/ceph:/sbin/nologin
|
||||
systemd-timesync:x:993:991:systemd Time Synchronization:/:/sbin/nologin
|
||||
systemd-network:x:991:990:systemd Network Management:/:/sbin/nologin
|
||||
systemd-resolve:x:990:989:systemd Resolver:/:/sbin/nologin
|
||||
systemd-bus-proxy:x:989:988:systemd Bus Proxy:/:/sbin/nologin
|
||||
cockpit-ws:x:988:987:User for cockpit-ws:/:/sbin/nologin
|
33
ostree-config/manifests/rocky-coreos-base.yaml
Normal file
33
ostree-config/manifests/rocky-coreos-base.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
packages:
|
||||
- rpm
|
||||
- policycoreutils
|
||||
- kernel
|
||||
- kernel-modules-extra
|
||||
- rpm-ostree
|
||||
- ostree-grub2
|
||||
- selinux-policy-targeted
|
||||
- lvm2
|
||||
- biosdevname
|
||||
- keyutils
|
||||
- binutils
|
||||
- nss-altfiles
|
||||
- polkit
|
||||
|
||||
ignore-removed-users:
|
||||
- root
|
||||
ignore-removed-groups:
|
||||
- root
|
||||
etc-group-members:
|
||||
- wheel
|
||||
- sudo
|
||||
- systemd-journal
|
||||
- adm
|
||||
|
||||
|
||||
check-passwd:
|
||||
type: "file"
|
||||
filename: "passwd"
|
||||
check-groups:
|
||||
type: "file"
|
||||
filename: "group"
|
||||
|
6
ostree-config/manifests/rocky-coreos-post.yaml
Normal file
6
ostree-config/manifests/rocky-coreos-post.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
postprocess:
|
||||
- |
|
||||
#!/usr/bin/env bash
|
||||
set -xeuo pipefail
|
||||
|
||||
# Placeholder for commands
|
14
ostree-config/manifests/rocky-coreos-system_tools.yaml
Normal file
14
ostree-config/manifests/rocky-coreos-system_tools.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
# config/manifests/rocky-coreos-system_tools.yaml
|
||||
#
|
||||
# Contains system (tools) packages which are often used on a regular
|
||||
# system, but not needed for the base system to work
|
||||
packages:
|
||||
- NetworkManager
|
||||
- iproute
|
||||
- iputils
|
||||
- openssh-clients
|
||||
- openssh-server
|
||||
- less
|
||||
- vim
|
||||
- strace
|
||||
- lsof
|
8
ostree-config/rocky-86-appstream.repo
Normal file
8
ostree-config/rocky-86-appstream.repo
Normal file
@ -0,0 +1,8 @@
|
||||
[rocky-86-appstream]
|
||||
name=Rocky Linux 8.6 - AppStream
|
||||
#baseurl=http://dl.rockylinux.org/pub/rocky/8.6/AppStream/x86_64/os/
|
||||
baseurl=http://192.168.122.89/repos/rocky86/AppStream/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
countme=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
|
8
ostree-config/rocky-86-baseos.repo
Normal file
8
ostree-config/rocky-86-baseos.repo
Normal file
@ -0,0 +1,8 @@
|
||||
[rocky-86-baseos]
|
||||
name=Rocky Linux 8.6 - BaseOS
|
||||
#baseurl=http://dl.rockylinux.org/pub/rocky/8.6/BaseOS/x86_64/os/
|
||||
baseurl=http://192.168.122.89/repos/rocky86/BaseOS/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
countme=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
|
Loading…
Reference in New Issue
Block a user