Sunday, September 10, 2017

CoreOS-Container OS

CoreOS

CoreOS is opensource lightweight container Operating system
Tested CoreOS in lab environment.

CoreOS cluster components

fleet-  an open-source cluster scheduler . In order to schedule and manage applications across the entirety of the cluster, a tool called fleet is used. Fleet serves as a cluster-wide init system that can be used to manage processes across the entire cluster
Note:On December 22, 2016, CoreOS announced that it no longer maintains fleet. CoreOS recommends using Kubernetes for all clustering needs.

etcd - CoreOS uses a globally distributed key-value store called etcd to pass configuration data between nodes. This component is also the platform for service discovery, allowing applications to be dynamically configured based on the information available through the shared resource.

flannel -The CoreOS Software Defined Network is a popular mechanism for Kubernetes networking

Kubernetes Role-Based Access Control (RBAC) system, and our open-source dex OIDC provider complements it with federation to major authentication providers and enterprise solutions like LDAP


with CoreOS, you’re able to spin up a cluster easily and the entire system is build for high-availability clusters. Security patches and system updates are applied automatically. The required system reboots are handled automatically with the help of etcd. By default, only one machine at a time will reboot within the cluster.

Download ISO image from CoreOS website

https://coreos.com/os/docs/latest/booting-with-iso.html

Mount ISO and boot VM with ISO image.

Firstly, we still haven’t installed the CoreOS standalone version. What we have now is similar to a live CD of the OS running. 

Using username "core".
Using keyboard-interactive authentication.
Password:
Last login: Wed Feb 22 06:18:02 UTC 2017 on tty1
Container Linux by CoreOS stable (1235.9.0)
Update Strategy: No Reboots
core@localhost ~


core@localhost ~ $ sudo openssl passwd -1
WARNING: can't open config file: /etc/ssl/openssl.cnf
Password:
Verifying - Password:
$1$TrdUNvCS$pu3p3i7ZUqRCkuWKjAp0E/

core@localhost ~ $vi cloud_config.yml
#cloud-config
users:
- name: rengs
  passwd: $1$TrdUNxxxxxxxxxWKjAp0E/
  groups:
  - sudo
  - docker
:wq!

Installing standalone CoreOS from image 

core@localhost / $ sudo coreos-install -d /dev/sda -C stable -c cloud_config.yml
2017/02/22 07:48:33 Checking availability of "local-file"
2017/02/22 07:48:33 Fetching user-data from datasource of type "local-file"
Downloading the signature for https://stable.release.core-os.net/amd64-usr/1235.9.0/coreos_production_image.bin.bz2...
2017-02-22 07:48:36 URL:https://stable.release.core-os.net/amd64-usr/1235.9.0/coreos_production_image.bin.bz2.sig [564/564] -> "/tmp/coreos-install.UsVFtisqOq/coreos_production_image.bin.bz2.sig" [1]
Downloading, writing and verifying coreos_production_image.bin.bz2...
2017-02-22 07:50:18 URL:https://stable.release.core-os.net/amd64-usr/1235.9.0/coreos_production_image.bin.bz2 [276861469/276861469] -> "-" [1]
gpg: Signature made Thu Feb  2 02:52:11 2017 UTC
gpg:                using RSA key 48F9B96A2E16137F
gpg:                issuer "buildbot@coreos.com"
gpg: key 50E0885593D2DCB4 marked as ultimately trusted
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "CoreOS Buildbot (Offical Builds) <buildbot@coreos.com>" [ultimate]
Installing cloud-config...
Success! CoreOS stable 1235.9.0 is installed on /dev/sda
core@localhost / $

Now Core OS boot from HDD...After reboot...

Using username "rengs".
Using keyboard-interactive authentication.
Password:
Container Linux by CoreOS stable (1235.9.0)
rengs@localhost ~ $


rengs@localhost ~ $ uname -a
Linux localhost 4.7.3-coreos-r2 #1 SMP Thu Feb 2 02:26:10 UTC 2017 x86_64 Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz GenuineIntel GNU/Linux
rengs@localhost ~ $ df -h
Filesystem       Size  Used Avail Use% Mounted on
devtmpfs         483M     0  483M   0% /dev
tmpfs            499M     0  499M   0% /dev/shm
tmpfs            499M  312K  499M   1% /run
tmpfs            499M     0  499M   0% /sys/fs/cgroup
/dev/sda9        5.5G   30M  5.2G   1% /
/dev/mapper/usr  985M  625M  309M  67% /usr
/dev/sda1        128M   39M   90M  31% /boot
tmpfs            499M     0  499M   0% /media
tmpfs            499M     0  499M   0% /tmp
/dev/sda6        108M   52K   99M   1% /usr/share/oem
tmpfs            100M     0  100M   0% /run/user/1000
rengs@localhost ~ $ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

More info
https://coreos.com/
Kubernetes on CoreOS
https://coreos.com/kubernetes/docs/latest/

No comments:

Post a Comment

AWS Autoscaling demo lab Configuring VPC, Public/Private subnets, Internet Gateway (IGW), NAT gateway, etc.,   Crea...