6 C
Texas
Melhttp://www.osradar.com
Guru Unix /Linux and GNU supporter

Coreos : Your first step to docker and Kubernetes

The Coreos is the best Container operating system, using the Docker technology and that has been programmed to support ware-house scale massive server deployments.CoreOS offers several products in addition to Container Linux, including the Rkt container engine and a commercial enterprise version of Kubernetes named Tectonic. While Container Linux is open source, CoreOS sells support for the OS. on January 2018 Redhat announced that it has signed a definitive agreement to acquire CoreOS, Inc., an innovator and leader in Kubernetes and container-native solutions, for a purchase price of $250 million,

i will show you in this tutorial to start using  Coreos in your virtual box.

Coreos : Your first step to docker and KubernetesYour first step to docker and Kubernetes

Post Instalation

from the Client Server  (Windows/Linux) , Try to  generate ssh  pub-key

im running  Opensuse15

- Advertisement -
#ssh-keygen

Please save this key, You will use later on Coreos Configuration file.

Boot Coreos in Virtual box or Vmware

you are expecting to see something  like this :

Create md5  password for an user Like osradar user in my case

sudo openssl passwd -1 > cloud-config.yaml

Please edit    the  cloud-config like described  in the   text  bellow and  don’t  forget to  use the ssh pub from the the client to be able  without  password to  core user.

In my case  the user osradar is part from sudo and docker group

#cloud-config
users:
- name: osradar
passwd: "$1$jrZWXYCv$7xeeqlOrELkxo49vIgItK/"
groups:
- "sudo"
- "docker"

ssh-authorized-keys:
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMLRh6JpAFS5WJgM6Wf3C6N7OZcFUwOtiRXePNW2Zoy5+4uiLQlaDwhqdqUoawQh6bO6bMOkk7Quw2ZvalBN7AuorWwOEHs0anG4qOs4FGBWjKYX+2Tif4s3KJ82TKyJdrXXgjB/uyk5OXxqM++pW2FHeSDg38NR7tp1e9qx7TCMnBYlk8PB9b6xvWldszy1cv9OsFzzrsYfnkUnmBS8f/0rdfGC24veGso2U2NcztMakWVusgWouNpnbyNk3TcfEWBZzq1AbCncixSEY1tN1m/hWDMoHjv/FtH7DlJhcMYfM4JHvNvIY6joQXXvAYZAnM6S5SZP88Q+y9UGMgdK/5 [email protected]"

 

How to Validate a CoreOS cloud-config file

core@localhost ~ $ coreos-cloudinit -validate --from-file cloud-config.yml
2019/02/14 22:11:27 Checking availability of "local-file"
2019/02/14 22:11:27 Fetching user-data from datasource of type "local-file"

Now install the install  The Coreos on your DISK

we  assume that  your  disk is  /dev/sda

core@localhost ~ $ sudo coreos-install -d /dev/sda -C stable -c cloud-config.yml
2019/02/14 22:13:44 Checking availability of "local-file"
2019/02/14 22:13:44 Fetching user-data from datasource of type "local-file"
Current version of CoreOS Container Linux stable is 1967.6.0
Downloading the signature for https://stable.release.core-os.net/amd64-usr/1967.6.0/coreos_production_image.bin.bz2...
2019-02-14 22:13:47 URL:https://stable.release.core-os.net/amd64-usr/1967.6.0/coreos_production_image.bin.bz2.sig [566/566] -> "/tmp/coreos-install.8wK6vnAHBT/coreos_production_image.bin.bz2.sig" [1]
Downloading, writing and verifying coreos_production_image.bin.bz2...
gpg: Signature made Tue Feb 12 21:59:20 2019 UTC
gpg: using RSA key 4D7241B14AA47290515D6A8D7FB32ABC0638EB2F
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) <[email protected]>" [ultimate]
Installing cloud-config...
Success! CoreOS Container Linux stable 1967.6.0 is installed on /dev/sda
core@localhost ~ $

Now disconnect the ISO and reboot the system

You are ready : you can login with predefined password or connect from the client ( Linux-suse)  to ssh core@coreos-IP. You should be able to login without password.

Login wthout password

linux-osradar:~ # ssh [email protected]
The authenticity of host '172.18.32.51 (172.18.32.51)' can't be established.
ECDSA key fingerprint is SHA256:iEUsbUUbjkuUOohQRe+V2fjgjsLMN8dgukGvKoOQ6NQ.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.18.32.51' (ECDSA) to the list of known hosts.
Container Linux by CoreOS stable (1967.6.0)
core@localhost ~ $

Or login With osradar user and password u have already created.

How to install packages in Coreos

core@localhost ~ $ /bin/toolbox
Downloading sha256:0be2a68855d [=============================] 89.9 MB / 89.9 MB
successfully removed aci for image: "sha512-5baf5573383b151df910506dade067e45455472e167e251d70b5375386786d61"
rm: 1 image(s) successfully removed
Spawning container core-fedora-latest on /var/lib/toolbox/core-fedora-latest.
Press ^] three times within 1s to kill container.
[root@localhost ~]#

There is many things to do with Coreos.  we will back later in next articles how to use Coreos to deploy applications.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article