Skip to content

Commit

Permalink
Update Fedora Atomic from 27 to 28
Browse files Browse the repository at this point in the history
* Fedora Atomic 2018-04-25 release
  • Loading branch information
dghubble committed May 22, 2018
1 parent 4ea1fde commit 5816fef
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion aws/fedora-atomic/kubernetes/ami.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ data "aws_ami" "fedora" {

filter {
name = "name"
values = ["Fedora-Atomic-27-20180419.0.x86_64-*-gp2-*"]
values = ["Fedora-AtomicHost-28-20180425.0.x86_64-*-gp2-*"]
}
}
2 changes: 1 addition & 1 deletion aws/fedora-atomic/kubernetes/workers/ami.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ data "aws_ami" "fedora" {

filter {
name = "name"
values = ["Fedora-Atomic-27-20180419.0.x86_64-*-gp2-*"]
values = ["Fedora-AtomicHost-28-20180425.0.x86_64-*-gp2-*"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ network --bootproto=dhcp --device=link --activate --onboot=on
bootloader --timeout=1 --append="ds=nocloud\;seedfrom=/var/cloud-init/"
services --enabled=cloud-init,cloud-init-local,cloud-config,cloud-final

ostreesetup --osname="fedora-atomic" --remote="fedora-atomic" --url="${atomic_assets_endpoint}/repo" --ref=fedora/27/x86_64/atomic-host --nogpg
ostreesetup --osname="fedora-atomic" --remote="fedora-atomic" --url="${atomic_assets_endpoint}/repo" --ref=fedora/28/x86_64/atomic-host --nogpg

reboot

Expand All @@ -27,7 +27,7 @@ curl --retry 10 "${matchbox_http_endpoint}/generic?mac=${mac}&os=installed" -o /
echo "instance-id: iid-local01" > /var/cloud-init/meta-data

rm -f /etc/ostree/remotes.d/fedora-atomic.conf
ostree remote add fedora-atomic https://kojipkgs.fedoraproject.org/atomic/27 --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-27-primary
ostree remote add fedora-atomic https://dl.fedoraproject.org/atomic/repo/ --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-primary

# lock root user
passwd -l root
Expand Down
2 changes: 1 addition & 1 deletion bare-metal/fedora-atomic/kubernetes/profiles.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
default_assets_endpoint = "${var.matchbox_http_endpoint}/assets/fedora/27"
default_assets_endpoint = "${var.matchbox_http_endpoint}/assets/fedora/28"
atomic_assets_endpoint = "${var.atomic_assets_endpoint != "" ? var.atomic_assets_endpoint : local.default_assets_endpoint}"
}

Expand Down
2 changes: 1 addition & 1 deletion bare-metal/fedora-atomic/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variable "atomic_assets_endpoint" {
description = <<EOD
HTTP endpoint serving the Fedora Atomic Host vmlinuz, initrd, os repo, and ostree repo (.e.g `http://example.com/some/path`).
Ensure the HTTP server directory contains `vmlinuz` and `initrd` files and `os` and `repo` directories. Leave unset to assume ${matchbox_http_endpoint}/assets/fedora/27
Ensure the HTTP server directory contains `vmlinuz` and `initrd` files and `os` and `repo` directories. Leave unset to assume ${matchbox_http_endpoint}/assets/fedora/28
EOD
}

Expand Down
27 changes: 14 additions & 13 deletions docs/atomic/bare-metal.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,17 @@ sudo systemctl enable httpd --now
Download the [Fedora Atomic](https://getfedora.org/en/atomic/download/) ISO which contains install files and add them to the serve directory.

```
sudo mount -o loop,ro Fedora-Atomic-ostree-*.iso /mnt
sudo mkdir -p /var/www/html/fedora/27
sudo cp -av /mnt/* /var/www/html/fedora/27/
sudo mount -o loop,ro Fedora-AtomicHost-ostree-*.iso /mnt
sudo mkdir -p /var/www/html/fedora/28
sudo cp -av /mnt/* /var/www/html/fedora/28/
sudo umount /mnt
```

Checkout the [fedora-atomic](https://pagure.io/fedora-atomic) ostree manifest repo.

```
git clone https://pagure.io/fedora-atomic.git && cd fedora-atomic
git checkout f27
git checkout f28
```

Compose an ostree repo from RPM sources.
Expand All @@ -145,20 +146,20 @@ sudo rpm-ostree compose tree --repo=repo fedora-atomic-host.json
Serve the ostree `repo` as well.

```
sudo cp -r repo /var/www/html/fedora/27/
tree /var/www/html/fedora/27/
├── images
│   ├── pxeboot
│      ├── initrd.img
│      └── vmlinuz
sudo cp -r repo /var/www/html/fedora/28/
tree /var/www/html/fedora/28/
├── images
│   ├── pxeboot
│      ├── initrd.img
│      └── vmlinuz
├── isolinux/
├── repo/
```

Verify `vmlinuz`, `initrd.img`, and `repo` are accessible from the HTTP server (i.e. `atomic_assets_endpoint`).

```
curl http://example.com/fedora/27/
curl http://example.com/fedora/28/
```

!!! note
Expand Down Expand Up @@ -246,7 +247,7 @@ module "bare-metal-mercury" {
# bare-metal
cluster_name = "mercury"
matchbox_http_endpoint = "http://matchbox.example.com"
atomic_assets_endpoint = "http://example.com/fedora/27"
atomic_assets_endpoint = "http://example.com/fedora/28"
# configuration
k8s_domain_name = "node1.example.com"
Expand Down Expand Up @@ -400,7 +401,7 @@ Check the [variables.tf](https://github.com/poseidon/typhoon/blob/master/bare-me
|:-----|:------------|:--------|
| cluster_name | Unique cluster name | mercury |
| matchbox_http_endpoint | Matchbox HTTP read-only endpoint | "http://matchbox.example.com:port" |
| atomic_assets_endpoint | HTTP endpoint serving the Fedora Atomic vmlinuz, initrd.img, and ostree repo | "http://example.com/fedora/27" |
| atomic_assets_endpoint | HTTP endpoint serving the Fedora Atomic vmlinuz, initrd.img, and ostree repo | "http://example.com/fedora/28" |
| k8s_domain_name | FQDN resolving to the controller(s) nodes. Workers and kubectl will communicate with this endpoint | "myk8s.example.com" |
| ssh_authorized_key | SSH public key for user 'fedora' | "ssh-rsa AAAAB3Nz..." |
| asset_dir | Path to a directory where generated assets should be placed (contains secrets) | "/home/user/.secrets/clusters/mercury" |
Expand Down
19 changes: 9 additions & 10 deletions docs/atomic/google-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,35 +83,34 @@ Additional configuration options are described in the `google` provider [docs](h

Project Atomic does not publish official Fedora Atomic images to Google Cloud. However, Google Cloud allows [custom boot images](https://cloud.google.com/compute/docs/images/import-existing-image) to be uploaded to a bucket and imported into your project.

Download the Fedora Atomic 27 [raw image](https://getfedora.org/en/atomic/download/) and decompress the file.
Download the Fedora Atomic 28 [raw image](https://getfedora.org/en/atomic/download/) and decompress the file.

```
xz -d Fedora-Atomic-27-20180326.1.x86_64.raw.xz
xz -d Fedora-AtomicHost-28-20180425.0.x86_64.raw.xz
```

Rename the image `disk.raw`. Gzip compress and tar the image.

```
mv Fedora-Atomic-27-20180326.1.x86_64.raw disk.raw
tar cvzf fedora-atomic-27.tar.gz disk.raw
mv Fedora-AtomicHost-28-20180425.0.x86_64.raw disk.raw
tar cvzf fedora-atomic-28.tar.gz disk.raw
```

List available storage buckets and upload the tar.gz.

```
gsutil list
gsutil cp fedora-atomic-27.tar.gz gs://BUCKET_NAME
gsutil cp fedora-atomic-28.tar.gz gs://BUCKET_NAME
```

Create a Google Compute Engine image from the bucket file.

```
gcloud compute images list
gcloud compute images create fedora-atomic-27 --source-uri gs://BUCKET/fedora-atomic-27.tar.gz
gcloud compute images create fedora-atomic-28 --source-uri gs://BUCKET/fedora-atomic-28.tar.gz
```

Note your project id and the image name for setting `os_image` later (e.g. proj-id/fedora-atomic-27).

Note your project id and the image name for setting `os_image` later (e.g. proj-id/fedora-atomic-28).

## Cluster

Expand All @@ -138,7 +137,7 @@ module "google-cloud-yavin" {
# configuration
ssh_authorized_key = "ssh-rsa AAAAB3Nz..."
asset_dir = "/home/user/.secrets/clusters/yavin"
os_image = "MY-PROJECT_ID/fedora-atomic-27"
os_image = "MY-PROJECT_ID/fedora-atomic-28"
# optional
worker_count = 2
Expand Down Expand Up @@ -236,7 +235,7 @@ Check the [variables.tf](https://github.com/poseidon/typhoon/blob/master/google-
| region | Google Cloud region | "us-central1" |
| dns_zone | Google Cloud DNS zone | "google-cloud.example.com" |
| dns_zone_name | Google Cloud DNS zone name | "example-zone" |
| os_image | Custom uploaded Fedora Atomic 27 image | "PROJECT-ID/fedora-atomic-27" |
| os_image | Custom uploaded Fedora Atomic image | "PROJECT-ID/fedora-atomic-28" |
| ssh_authorized_key | SSH public key for user 'fedora' | "ssh-rsa AAAAB3NZ..." |
| asset_dir | Path to a directory where generated assets should be placed (contains secrets) | "/home/user/.secrets/clusters/yavin" |

Expand Down

0 comments on commit 5816fef

Please sign in to comment.