dustymabe / summit-2017-container-lab

8 stars 36 forks source link

ch5 addition #72

Closed tchughesiv closed 7 years ago

tchughesiv commented 7 years ago

@dustymabe we'll need another cached image for this lab - registry.access.redhat.com/rhscl/mariadb-101-rhel7@sha256:cfbb641b1e1c42dc16d6670ab931914eefe9134cacc2d26504997370b4104e96

it appears as though it may already be cached though...

$ oc get images --as=system:admin | grep -i rhscl\/mariadb
sha256:cfbb641b1e1c42dc16d6670ab931914eefe9134cacc2d26504997370b4104e96   registry.access.redhat.com/rhscl/mariadb-101-rhel7@sha256:cfbb641b1e1c42dc16d6670ab931914eefe9134cacc2d26504997370b4104e96
tchughesiv commented 7 years ago

appears the imagestream was updated 6 days ago... for all of the imagestreams i've looked so far

$ oc describe is mariadb -n openshift --as=system:admin
Name:           mariadb
Namespace:      openshift
Created:        6 days ago
Labels:         <none>
Annotations:        openshift.io/display-name=MariaDB
            openshift.io/image.dockerRepositoryCheck=2017-04-07T12:57:49Z
Docker Pull Spec:   172.30.1.1:5000/openshift/mariadb
Unique Images:      1
Tags:           2

10.1 (latest)
  tagged from registry.access.redhat.com/rhscl/mariadb-101-rhel7:latest

  Provides a MariaDB 10.1 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.1/README.md.
  Tags: mariadb

  * registry.access.redhat.com/rhscl/mariadb-101-rhel7@sha256:cfbb641b1e1c42dc16d6670ab931914eefe9134cacc2d26504997370b4104e96
      6 days ago
dustymabe commented 7 years ago

is it there? /me really doesn't want to respin the image at this point.

tchughesiv commented 7 years ago

sure does seem that way... just recreated the minishift env and it appears before i even deploy anything.

trying to find it on the disk now.

$ oc describe image sha256:cfbb641b1e1c42dc16d6670ab931914eefe9134cacc2d26504997370b4104e96 --as=system:admin 
Name:       sha256:cfbb641b1e1c42dc16d6670ab931914eefe9134cacc2d26504997370b4104e96
Namespace:  <none>
Created:    6 days ago
Labels:     <none>
Annotations:    <none>
Docker Image:   registry.access.redhat.com/rhscl/mariadb-101-rhel7@sha256:cfbb641b1e1c42dc16d6670ab931914eefe9134cacc2d26504997370b4104e96
Image Size: 132.9 MB (last binary layer 60.72 MB)
Image Created:  7 weeks ago
Author:     <none>
Arch:       amd64
Entrypoint: container-entrypoint
Command:    run-mysqld
Working Dir:    <none>
User:       27
Exposes Ports:  3306/tcp
Docker Labels:  BZComponent=rh-mariadb101-docker
        Name=rhscl/mariadb-101-rhel7
        Release=3.8
        Version=10.1
        architecture=x86_64
        authoritative-source-url=registry.access.redhat.com
        build-date=2017-02-23T04:24:20.167379
        com.redhat.build-host=ip-10-29-120-151.ec2.internal
        com.redhat.component=rh-mariadb101-docker
        description=MariaDB is a multi-user, multi-threaded SQL database server. The container image provides a containerized packaging of the MariaDB mysqld daemon and client application. The mysqld server daemon accepts connections from clients and provides access to content from MariaDB databases on behalf of the clients.
        distribution-scope=public
        io.k8s.description=MariaDB 10.1 SQL database server
        io.k8s.display-name=MariaDB 10.1
        io.openshift.expose-services=3306:mysql
        io.openshift.tags=database,mysql,mariadb,mariadb101,rh-mariadb101
        name=rhscl/mariadb-101-rhel7
        release=3.8
        summary=MariaDB 10.1 SQL database server
        vcs-ref=754594c31ea2e0eb0907c084e807d6f17321aa7a
        vcs-type=git
        vendor=Red Hat, Inc.
        version=10.1
Environment:    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        container=docker
        MYSQL_VERSION=10.1
        HOME=/var/lib/mysql
        SUMMARY=MariaDB 10.1 SQL database server
        DESCRIPTION=MariaDB is a multi-user, multi-threaded SQL database server. The container image provides a containerized packaging of the MariaDB mysqld daemon and client application. The mysqld server daemon accepts connections from clients and provides access to content from MariaDB databases on behalf of the clients.
        CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql
        MYSQL_PREFIX=/opt/rh/rh-mariadb101/root/usr
        ENABLED_COLLECTIONS=rh-mariadb101
        BASH_ENV=/usr/share/container-scripts/mysql/scl_enable
        ENV=/usr/share/container-scripts/mysql/scl_enable
        PROMPT_COMMAND=. /usr/share/container-scripts/mysql/scl_enable
Volumes:    /var/lib/mysql/data
tchughesiv commented 7 years ago

looks like there are several already on imported... all done 6 days ago... on the 7th. Is that when you recreated the image?

Best way to test this chapter (really the whole lab) is without network connectivity.

$ oc describe image sha256:4e937adb6f367ebc0cb18acd15f2614d501584ff586de6e575891a7f455b083b --as=system:admin 
Name:       sha256:4e937adb6f367ebc0cb18acd15f2614d501584ff586de6e575891a7f455b083b
Namespace:  <none>
Created:    6 days ago
Labels:     <none>
Annotations:    <none>
Docker Image:   registry.access.redhat.com/rhscl/php-56-rhel7@sha256:4e937adb6f367ebc0cb18acd15f2614d501584ff586de6e575891a7f455b083b
Image Size: 184.3 MB (last binary layer 43.52 MB)
Image Created:  7 weeks ago
Author:     <none>
Arch:       amd64
Entrypoint: container-entrypoint
Command:    /bin/sh -c $STI_SCRIPTS_PATH/usage
Working Dir:    /opt/app-root/src
User:       1001
Exposes Ports:  8080/tcp
Docker Labels:  BZComponent=rh-php56-docker
        Name=rhscl/php-56-rhel7
        Release=16.5
        Version=5.6
        architecture=x86_64
        authoritative-source-url=registry.access.redhat.com
        build-date=2017-02-23T08:11:06.399709
        com.redhat.build-host=ip-10-29-120-148.ec2.internal
        com.redhat.component=rh-php56-docker
        description=The Red Hat Enterprise Linux Base image is designed to be a fully supported foundation for your containerized applications.  This base image provides your operations and application teams with the packages, language runtimes and tools necessary to run, maintain, and troubleshoot all of your applications. This image is maintained by Red Hat and updated regularly. It is designed and engineered to be the base layer for all of your containerized applications, middleware and utilites. When used as the source for all of your containers, only one copy will ever be downloaded and cached in your production environment. Use this image just like you would a regular Red Hat Enterprise Linux distribution. Tools like yum, gzip, and bash are provided by default. For further information on how this image was built look at the /root/anacanda-ks.cfg file.
        distribution-scope=public
        io.k8s.description=Platform for building and running PHP 5.6 applications
        io.k8s.display-name=Apache 2.4 with PHP 5.6
        io.openshift.expose-services=8080:http
        io.openshift.s2i.scripts-url=image:///usr/libexec/s2i
        io.openshift.tags=builder,php,php56,rh-php56
        io.s2i.scripts-url=image:///usr/libexec/s2i
        name=rhscl/php-56-rhel7
        release=16.5
        summary=Provides the latest release of Red Hat Enterprise Linux 7 in a fully featured and supported base image.
        vcs-ref=9127e2a0606d84845e71361cf89ea6078572cd6e
        vcs-type=git
        vendor=Red Hat, Inc.
        version=5.6
Environment:    PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/rh/rh-php56/root/usr/bin
        container=docker
        STI_SCRIPTS_URL=image:///usr/libexec/s2i
        STI_SCRIPTS_PATH=/usr/libexec/s2i
        HOME=/opt/app-root/src
        BASH_ENV=/opt/app-root/etc/scl_enable
        ENV=/opt/app-root/etc/scl_enable
        PROMPT_COMMAND=. /opt/app-root/etc/scl_enable
        PHP_VERSION=5.6
tchughesiv commented 7 years ago

@scollier i've made some changes ... let me know if they solve your functional issues.

As far as formatting of notes, etc, goes... I'm indifferent. Make whatever changes you think would be best.

tchughesiv commented 7 years ago

@dustymabe i'd love to be able to demonstrate the included mariadb template... i think its a big plus for openshift devs... but, worst case... if it would require a rebuild on your part and you didn't want to do that... we can probably modify this chapter to use the mariadb image which is built in ch3.

dustymabe commented 7 years ago

ok, finally got a chance to run through this - my idea for "exploring openshift" was more to take the students on a tour of the web interface. We can do what you've got here in this lab5, but it does seem a bit advanced as we kinda just throw the user into deploymentconfigs and imagestreams without really introducing them.

is there a way we can get more of a "exploring your application in the openshift web console" part of this chapter?

as for embedding the mariadb image into the labvm, i can try to make a new image late tomorrow, but I don't know if scott mcB will take it at this point. Worst case scenario we can just "talk about" the image options and what one "could" do if they wanted to use them.

tchughesiv commented 7 years ago

K, this actually felt less "advanced" to me than the last chapter because they don't necessarily have to understand imagestreams or DC's to use them easily in openshift and they don't have to create a bunch of yaml files. We can explain them in little one-liners though at high level if that makes it better?

Or we scrap it, and stick with the chapter 4 stuff... but that feels more involved to me and doesn't speak to some of the ease of use of our platform.

scollier commented 7 years ago

@tchughesiv @dustymabe if this requires a respin, need to decide today what is going to happen.

tchughesiv commented 7 years ago

sounds like we will have some internet access?... just potentially saturated? another option could be we just kick of a pull off the mariadb image for the students before they started the labs. by the time they got to lab5, it'd be done... would likely be done before they even start any labs.

tchughesiv commented 7 years ago

Ch. 5 mods to-do

tchughesiv commented 7 years ago

moved to template file deployment model as discussed... web console walkthrough is next on my to-do list.

tchughesiv commented 7 years ago

@scollier & @dustymabe should we merge this as is now and have a separate PR for the web console additions? or?

dustymabe commented 7 years ago

Tommy, mostly looks good to me. maybe address a few of langdon's comments and then merge this. We can iterate from there