Menu
blog.headdesk.me
blog.headdesk.me

CoreOS – the container Linux

Posted on 2020/02/082021/07/25

CoreOS is a lightweight OS with docker. Here is how to install it on qemu-kvm, aka Virtual Machine Manager.

Download the CoreOS iso, create a new VM at least 2G ram, boot the VM.

Reset the password for core user, ssh to the machine, create a install.yaml file

#cloud-config
ssh_authorized_keys:
  - ssh-ed25519 AAAA… 

Install coreos to disk with the following command:

sudo coreos-install -d /dev/sda -C stable -c /home/core/install.yaml

Poweoff the vm. Remove the iso image and update the boot order. Boot the VM, ssh to it with your ssh key. DockerCE is pre-installed in the stable channel.

▶ ssh [email protected]
Warning: Permanently added '192.168.86.200' (ECDSA) to the list of known hosts.
Container Linux by CoreOS stable (2303.3.0)
[email protected] ~ $ docker --version
Docker version 18.06.3-ce, build d7080c1

By default, coreos gets IP from DHCP. To setup static IP, ssh to the machine and create the following file

# /etc/systemd/network/static.network 
[Match]
Name=ens3
[Network]
Address=192.168.2.22/24
Gateway=192.168.2.1
DNS=192.168.2.53

Then run systemctl restart systemd-networkd to restart networking.

Now let’s deploy our first container on coreos. My favorite image is etherpad. The following will get etherpad up and running in less than a minute.

coretest ~ # docker pull etherpad/etherpad

coretest ~ # docker run --name etherpad -e ADMIN_PASSWORD='this-is-a-test' -p80:9001 -d --restart=always etherpad/etherpad

Next step will be to read this step-by-step guide for setting up kubernetes on coreos. Did you know Rackspace cloud offers CoreOS? Couple of catchas with their image

The password provided to you during provisioning is meant for the core user, not root.

Their image is outdated. Not to worry, it can be easily updated with the following commands

systemctl unmask update-engine
systemctl start update-engine
update_engine_client -update
reboot

facebookShare on Facebook
TwitterTweet

Full text search

Recent Posts

  • Dumping AWS Organization tree
  • Free is the most expensive
  • Terraform conditional resource and blocks
  • Upgrade Ubuntu 16.04 to latest release
  • Inspect and control network traffic on AWS
  • aws (8)
  • coffee (1)
  • headfi (1)
  • linux (7)
  • others (55)
  • security (2)
  • tech (36)
  • wordpress (2)

apache aws awscli azure backup cloud coffee coreos distributed filesystem docker ec2 EL8 elasticcache etckeeper featured heartbleed kernel linux mail meltdown mysql php pine python rdp rds Redhat Red Hat RHEL RHEL7 rpm Ryzen snapshot spectre SSL systemd tech terraform ubuntu ubuntu upgrade vector vpn wordpress xtreemfs yum

©2022 blog.headdesk.me | Powered by SuperbThemes & WordPress