Skip to content

Instantly share code, notes, and snippets.

View emreozkangit's full-sized avatar

Emre Özkan emreozkangit

View GitHub Profile
emre@emreozkan:~$ rke up
INFO[0000] Building Kubernetes cluster
INFO[0000] [dialer] Setup tunnel for host [ec2-3-17-80-156.us-east-2.compute.amazonaws.com]
INFO[0002] [dialer] Setup tunnel for host [ec2-18-224-53-69.us-east-2.compute.amazonaws.com]
INFO[0004] [dialer] Setup tunnel for host [ec2-18-221-185-55.us-east-2.compute.amazonaws.com]
INFO[0006] [network] Deploying port listener containers
INFO[0007] [network] Pulling image [rancher/rke-tools:v0.1.15] on host [ec2-3-17-80-156.us-east-2.compute.amazonaws.com]
INFO[0007] [network] Pulling image [rancher/rke-tools:v0.1.15] on host [ec2-18-224-53-69.us-east-2.compute.amazonaws.com]
INFO[0007] [network] Pulling image [rancher/rke-tools:v0.1.15] on host [ec2-18-221-185-55.us-east-2.compute.amazonaws.com]
INFO[0011] [network] Successfully pulled image [rancher/rke-tools:v0.1.15] on host [ec2-18-224-53-69.us-east-2.compute.amazonaws.com]
emre@emreozkan:~$ rke config
[+] Cluster Level SSH Private Key Path [~/.ssh/id_rsa]:
[+] Number of Hosts [1]: 3
[+] SSH Address of host (1) [none]: ec2-3-17-80-156.us-east-2.compute.amazonaws.com
[+] SSH Port of host (1) [22]:
[+] SSH Private Key Path of host (ec2-3-17-80-156.us-east-2.compute.amazonaws.com) [none]:
[-] You have entered empty SSH key path, trying fetch from SSH key parameter
[+] SSH Private Key of host (ec2-3-17-80-156.us-east-2.compute.amazonaws.com) [none]:
[-] You have entered empty SSH key, defaulting to cluster level SSH key: ~/.ssh/id_rsa
[+] SSH User of host (ec2-3-17-80-156.us-east-2.compute.amazonaws.com) [ubuntu]: ubuntu
kroot@ip-10-0-0-136:/home/ec2-ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/deploy_cluster.yml
PLAY [Initialization Checkpoint Start] *********************************************************************************************************************************************************************
TASK [Set install initialization 'In Progress'] ************************************************************************************************************************************************************
ok: [ip-10-0-1-156.us-east-2.compute.internal]
PLAY [Populate config host groups] *************************************************************************************************************************************************************************
TASK [Load group name mapping variables] *******************************************************************************************************************************************************************
[root@ip-172-31-37-35 ec2-user]# buildah bud -t hello .
STEP 1: FROM fedora:28
Getting image source signatures
Copying blob sha256:012cb44e32533b8e62587fb98d54517182d9723031be8f9e06a9647ad6b46b61
85.49 MiB / 85.49 MiB [====================================================] 4s
Copying config sha256:4c5b21baa7a0a0cf6948d9dd31d7d300c171248ad9df1fbfc831057e494beaef
1.99 KiB / 1.99 KiB [======================================================] 0s
Writing manifest to image destination
Storing signatures
STEP 2: LABEL maintainer Emre Özkan <emreozkan@windowslive.com>
[root@ip-172-31-37-35 ec2-user]# buildah push --creds dockerhubusername:password hello:latest dockerhubusername/docker-test:latest
Getting image source signatures
Copying blob sha256:17beab58d693a5e55591675c3dcc5b575a44e476d125408102ce75348011f807
257.17 MiB / 257.17 MiB [=================================================] 23s
Copying blob sha256:d5c1f6b5e0051abb782be563efdce85c1382a5de53bb1016eb27a600ef917cd0
143.71 MiB / 143.71 MiB [=================================================] 13s
Copying config sha256:5507fef0e7a5e7dddf4993ef8c67315b1a3b0b171f1957193d912e3d7de366dd
1.17 KiB / 1.17 KiB [======================================================] 1s
Writing manifest to image destination
Copying config sha256:5507fef0e7a5e7dddf4993ef8c67315b1a3b0b171f1957193d912e3d7de366dd
FROM fedora:28
LABEL maintainer Emre Özkan <emreozkan@windowslive.com>
RUN dnf install -y tar gzip gcc make \
&& dnf clean all
ADD http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz /tmp/hello-2.10.tar.gz
RUN tar xvzf /tmp/hello-2.10.tar.gz -C /opt
[root@ip-172-31-26-21 ec2-user]# docker pull dockerhubusername/docker-test:latest
latest: Pulling from dockerhubusername/docker-test
012cb44e3253: Pull complete
41e2405c2362: Pull complete
Digest: sha256:b476265e93ff24fe135972ffa34a64e0f9c552019565991d4ac2ef3a000a76c0
Status: Downloaded newer image for dockerhubusername/docker-test:latest
[root@ip-172-31-26-21 ec2-user]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dockerhubusername/docker-test latest 5507fef0e7a5 39 minutes ago 408MB
[root@ip-172-31-26-21 ec2-user]# docker run -t dockerhubusername/docker-test:latest
Hello, world!
#!/usr/bin/env bash
set -o errexit
# Hangi image'ı kullanacağını söylüyoruz
container=$(buildah from fedora:28)
buildah config --label maintainer="Emre Özkan <emreozkan@windowslive.com>" $container
# Ftp ile dosyamızı container içine atıyoruz
[root@ip-172-31-37-35 ec2-user]# ./buildah.sh
31e066137a962676e89f69d1b65382de95a7ef7d914b8cb956f41ea72e0f516b
Fedora 28 - x86_64 - Updates 43 MB/s | 30 MB 00:00
Fedora 28 - x86_64 33 MB/s | 60 MB 00:01
Last metadata expiration check: 0:00:08 ago on Thu Mar 28 05:55:49 2019.
Package tar-2:1.30-3.fc28.x86_64 is already installed, skipping.
Package gzip-1.9-3.fc28.x86_64 is already installed, skipping.
Dependencies resolved.
============================================================================================================================================================================================================
Package