Pages

Saturday, November 1, 2014

Out of Space... Add a disk!

I have a lenovo Thinkpad T540p. This laptop has a Samsung 256GB SSD drive.  This drive ran out of space long ago.  The good thing is, you can add a disk to the T540p.  I went to lenovo's site and ordered:

After installing the drive, I had to figure out how to carve up the new space.  There are probably many ways to do this, but I knew I wanted to:
  • Add more space to the /dev/fedora/root LV.
  • Keep the new, slower disk in a separate VG.  I didn't want any LV's to span these two disks.

Friday, September 12, 2014

Simple git rebase example

Situation:

So I forked the Google Kubernetes project.  Then I created a fedora_gs_guide branch.  I made some changes to the getting started guide and then I submitted a pull request.  I asked someone to review it and they had a couple of changes.  So, I make the changes, and commit.  Now when I look at the PR, I see multiple commits.  I think it's best practice to squash all those commits into one if possible.  So, how do you do that.  Well, here's how I did it.  I'm sure there are other ways to do this, probably a lot more efficiently (comments welcome).  But, it worked.  These are my notes from the process.

I needed to make sure my master and fedora_gs_guide branch were clean and rebased to upstream master.

Make sure I'm on my local master.

$ git checkout master

Wednesday, July 30, 2014

Getting Started with Kubernetes / Docker on Fedora

EDIT 9/16/2014 ***********************

I have taken these instructions and put them on the kubernetes github repo:

Kubernetes Gitub

End EDIT ******************


These are my notes on how to get started evaluating a Fedora / Docker / kubernetes environment.  I'm going to start with two hosts.  Both will run Fedora rawhide.  The goal is to stand up both hosts with kubernetes / Docker and use kubernetes to orchestrate the deployment of a couple of simple applications.  Derek Carr has already put together a great tutorial on getting a kubernetes environment up using vagrant.  However, that process is quite automated and I need to set it all up from scratch.

Install Fedora rawhide using the instructions from here.  I just downloaded the boot.iso file and used KVM to deploy the Fedora rawhide hosts.  My hosts names are: fed{1,2}.

The kubernetes package provides four services: apiserver, controller, kubelet, proxy.  These services are managed by systemd unit files. We will break the services up between the hosts.  The first host, fed1, will be the kubernetes master.  This host will run the apiserver and controller.  The remaining host, fed2 will be minions and run kubelet, proxy and docker.

This is all changing rapidly, so if you walk through this and see any errors or something that needs to be updated, please let me know via comments below.

So let's get started.

Thursday, July 3, 2014

Getting Started with go

I have been following the progress of Jason and his 180 day coding challenge.  I'm going to try something similar except that I'm going to work on go.  The only problem is, that I can't start for 10 days because of some PTO that I have to take starting tomorrow.  Having said that, I'm throwing down the gauntlet now and when I get back, I'll post everyday on my progress.  A few rules, per Jason's post above - yes, I did steal these directly from him with one change on the first rule:

  1. Every business day for a minimum of 30 minutes, I must write code or learn about the tool-chain used in the development process. Documentation about the code does not count.
  2. The resulting code must be useful, or it should be code that points towards something that eventually will be. No tweaking indentation, no code re-formatting, and if at all possible no re-factoring. (All these things are permitted, but not as the exclusive work of the day.) Tutorials and working through code examples as a means to learn are allowed.
  3. All code must be written before midnight, and after 6AM.
  4. The code must be Open Source and posted on Github.
My current status:



I have signed up for the Pluralsight on-line go class here. So far, I have made it to the "Variables, Types and Pointers" section.  We just haven't written much code yet.  So I won't count that.

In addition, I have downloaded and installed IntelliJ IDEA 13.1.3 IDE, community edition.  The on-line class they use this so I figured I'd give it a try.  It was relatively easy to set up, I should write a quick post on what I did for reference.  I'm also going to evaluate the vim plug-ins out there for writing go more efficiently.


So, When I get back I plan on kicking this off full steam ahead.


Sunday, May 25, 2014

Quick VIM Macro Reference

Pulled from: Here

qd start recording to register d
... your complex series of commands
q stop recording
@d execute your macro
@@ execute your macro again

Tuesday, May 13, 2014

Moving Fedora Dockerfiles - It's Official!

Today I moved my Fedora-Dockerfiles repo to the Fedora Cloud SIG github repo.  All forks, stars, wiki pages, etc...  were maintained during the transfer.  This repo will still be the source for the fedora-dockerfiles package.  The new location is at:

https://github.com/fedora-cloud/Fedora-Dockerfiles

This makes it a bit more official.  I will stay involved with the maintenance of the Fedora Dockerfiles moving forward.  Also, please have a look at some of the work going on in the Fedora Cloud SIG here.  There are always opportunities to help out.  Exciting times!


Friday, May 9, 2014

Friday, May 2, 2014

New fedora-dockerfiles Package is out

Just this week the new fedora-dockerfiles package was released. Check out the examples that are provided.


$ repoquery --list fedora-dockerfiles | grep Dockerfile
/usr/share/fedora-dockerfiles/apache/Dockerfile
/usr/share/fedora-dockerfiles/bind/Dockerfile
/usr/share/fedora-dockerfiles/couchdb/Dockerfile
/usr/share/fedora-dockerfiles/earthquake/Dockerfile
/usr/share/fedora-dockerfiles/firefox/Dockerfile
/usr/share/fedora-dockerfiles/hadoop/single_container/Dockerfile
/usr/share/fedora-dockerfiles/lighttpd/Dockerfile
/usr/share/fedora-dockerfiles/memcached/Dockerfile
/usr/share/fedora-dockerfiles/mongodb/Dockerfile
/usr/share/fedora-dockerfiles/mysql/Dockerfile

Monday, April 21, 2014

Red Hat Summit Labs Released

I had a great time at Red Hat summit this year in San Francisco.  Here are the labs that I worked on.

1. Deploying OpenShift Enterprise on Red Hat Enterprise Linux Openstack Platform via Heat

Specifically:

Github Master Doc

2. Containers & resource management in Red Hat Enterprise Linux 7 beta

Specifically:

Github Master Doc

The first lab had 80 students and went very well.  Lots of people were able to walk through the entire lab and finish up.  The second lab had 160 students and it also went well.  It was an intro to Docker on Red Hat Enterprise Linux 7 beta and had two sections: 1. Intro to Docker 2. Linking containers.  Once again, almost all students were able to finish both sections and get it all done.

Friday, March 28, 2014

How to Enter a Docker Container without SSH

On of my colleagues here showed me a great trick that I had to document immediately.  The question of the day was "How do I access a container without having SSH installed?"  It turns out, it's easier than you might think.  Let's take a look at the process.

The first thing that you need to do is get the PID (Process ID) of the container that you want to enter.  So, grab the <Container ID> and inspect it.

# docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a711c7ab0420 scott:latest echo hello 31 minutes ago Exit 0 distracted_tesla

# docker inspect --format '{{ .State.Pid }}' a711c7ab0420
2217

Tuesday, March 25, 2014

Python in a container on Fedora, using Docker

In just a few simple steps, you can have an instance of Python up and running in a Docker container. This one was contributed by Aditya Patawari. You can get the latest Dockerfiles here:

https://github.com/scollier/Fedora-Dockerfiles

Tested on Docker 0.7.6 and 0.8.1 and Fedora 20

Get the version of Docker:

# docker version


To build:

Wednesday, March 19, 2014

Docker Registry in a Container on Fedora, Using Docker

In just a few simple steps, you can have an instance of the Docker registry up and running in a Docker container. This one was contributed by Stephen Tweedie. You can get the latest Dockerfiles here:

https://github.com/scollier/Fedora-Dockerfiles

Tested on Docker 0.8.1 and Fedora 20

Get the version of Docker:

# docker version

To build:

# docker build -rm -t username/registry .

To run:

# docker run -d -p 5000:5000 username/registry

Monday, March 3, 2014

Earthquake Twitter Client on Fedora, Using Docker

In just a few simple steps, you can have an instance of the earthquake terminal based twitter client up and running in a Docker container. Maciej was kind enough to contribute this gem - no pun intended. It's actually a really cool project and just one of the many apps that can be dockerized. Check out his webpage here and give him a follow.

This was tested on Docker 0.8.0

Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Sunday, March 2, 2014

New Package fedora-dockerfiles is now Available

Please check out and test fedora-dockerfiles. This package provides a community contributed set of examples that can assist in learning about Docker containers. Use these examples to stand up test environments using the Docker container engine. The following Dockerfiles are included:

Apache
CouchDB
Firefox
Memcached
MongoDB
MySQL
nginx
Nodejs
PostgreSQL
RabbitMQ
SSH
wordpress_single_container


Thursday, February 27, 2014

Proposal for OpenStack Summit 2014 - Atlanta

Speaker voting for OpenStack summit is open.  Well... It's about to close.  Hop on over and take a look at our proposal.  If you like it, vote it in.

Vote Here

Here's our title:

Sharing GlusterFS Storage Servers with Openstack Compute nodes via Docker

Friday, February 14, 2014

Hadoop + Volumes on Fedora, Using Docker

In just a few simple steps, you can have an instance of Hadoop up and running in a Docker container. This was tested with Hadoop 2.2 on Docker 0.7.6 on a Fedora 20 host. This article will also take a minute to explain how to use volumes as well. You may also want to view this in depth blog post by Michael Crosby.


Building the Hadoop Container -


Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

1. Get the version of Docker

# docker version

Friday, January 24, 2014

Made it! Red Hat Summit Lab is Posted

Labs are a lot of fun. They give us a great opportunity to interact with customers and show of our new products. We had a lab session last year and it was wait listed. Over 80 attendees showed up and were able to complete our session. I'm really looking forward to this year as well. See you there!

Check it out here: Summit

Deploying OpenShift Enterprise on Red Hat Enterprise Linux OpenStack Platform with Heat templates

Scott Collier — Senior principal systems engineer, Red Hat
Chris Alfonso — Principal software engineer, Red Hat
Steve Reichard — Senior principal software engineer, Red Hat
Vinny Valdez — Principal cloud architect, Red Hat

node.js on Fedora, Using Docker

Thanks to the node.js Fedora Dockerfile contribution from Jay Clark. In just a few simple steps, you can have an instance of node.js up and running in a Docker container. Here's how you run it. This was tested on Docker 0.7.2

Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Get the version of Docker

# docker version

To build:

Wednesday, January 22, 2014

Fedora Dockerfiles at the Austin Cloud Meetup

I had a great time presenting at the Austin Cloud meeting last night. There was a great turnout, probably ~ 125 or so people showed up.

The agenda consisted of:

• James Turnbull (skype-in), Intro to Docker and The Docker Book
• Scott Collier to talk about docker files in fedora.
• Ian Richardson to talk about Docker+Rundeck.
• Nars Tadepali to talk about Docker usecases at Actian.
• Aater Suleman to talk about Docker usecases at Flux7.
• Paul Czarkowski to talk about Deis.

Monday, January 20, 2014

Firefox via VNC on Fedora, Using Docker

In just a few simple steps, you can have an instance of Firefox via VNC up and running in a Docker container. Here's how you run it. This was tested on Docker 0.7.2

Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Get the version of Docker

Friday, January 17, 2014

Cool!

This was cool! It's great to see people use stuff you work on.



and

Thursday, January 16, 2014

MongoDB with an External Volume - Docker

I am still playing with different features of Docker and today was "External Volumes".  I thought I'd just try it with MongoDB.  So, lets get started.

1.  Check out the Dockerfile that I am using to do the MongoDB build:

FROM fedora
MAINTAINER scollier

RUN yum -y update
RUN yum -y install mongodb-server
RUN mkdir -p /data/db
RUN sed -i 's/dbpath =\/var\/lib\/mongodb/dbpath =\/data\/db/' /etc/mongodb.conf

VOLUME ["/data/db"]

EXPOSE 27017
ENTRYPOINT ["/usr/bin/mongod"]

Wednesday, January 15, 2014

MongoDB Server on Fedora, Using Docker

In just a few simple steps, you can have an instance of MongoDB up and running in a Docker container. Here's how you run it. This was tested on Docker 0.7.2

Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Get the version of Docker

# docker version

To build:

Tuesday, January 14, 2014

Maintaining content an upstream Fedora package - for the first time

OK, so today the fedora-dockerfiles package was created: fedora-dockerfiles. It should go through the process and be released in a few days to a week. The fedora-dockerfiles package provides examples of dockerfiles to get people up and running quickly. It's trivial code, but it's still my first time maintaining upstream code for a package. Here are some things that I see I need to start learning / testing:
I'm looking forward to being an active maintainer of these dockerfiles and I'll try to stay on top of it. The good thing is, if I run into any problems, I'm only an IRC chat away from having them resolved as anyone I've ever worked with that's involved in the Fedora Project has been happy to help.

memcached server on Fedora, using Docker

In just a few simple steps, you can have an instance of memcached up and running in a Docker container. Here's how you run it. This was tested on Docker 0.7.2

Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Get the version of Docker:

# docker version

Sunday, January 12, 2014

CouchDB Server on Fedora, Using Docker

In just a few simple steps, you can have an instance of CouchDB up and running in a Docker container. Here's how you run it. This was tested on Docker 0.7.2

Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Get the version of Docker:

# docker version

To build:

Copy the sources down, then -

# docker build -rm -t /couchdb .

To run:

# docker run -d -p 5984:5984 /couchdb

Test:

# curl -X PUT http://localhost:5984/test/ {"error":"file_exists","reason":"The database could not be created, the file already exists."}

# curl -X GET http://localhost:5984/test/ {"db_name":"test","doc_count":0,"doc_del_count":0,"update_seq":0,"purge_seq":0,
"compact_running":false,"disk_size":79,"data_size":0,"instance_start_time":" 1387384723608413"}

This is what it looks like. Enjoy the Asciicast.

Saturday, January 11, 2014

Apache Web Server on Fedora - Using Docker

Here's how you run it.  This was tested on Docker 0.7.2

Grab the dockerfile:
https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

1.  Get Docker version

# docker version

2. Build the image:

Copy the sources down and do the build-

# docker build -rm -t <username>/httpd .

3. Run it (if port 80 is open on your host):

# docker run -d -p 80:80 <username>/httpd

or to assign a random port that maps to port 80 on the container:

# docker run -d -p 80 <username>/httpd

To the port that the container is listening on:

# docker ps

To test:

# curl http://localhost

Here's what it looks like.

Where are my Dockerfiles?

I'll update the following repos with Fedora based Dockerfiles.


https://github.com/scollier/Fedora-Dockerfiles

Set up to mirror to:


https://git.fedorahosted.org/cgit/dockerfiles.git/

MySQL Server on Fedora, Using Docker

I created a new Dockerfile for MySQL on Fedora today.  It's posted

here: Github

and here: FedoraHosted

Here's how you run it:

# docker build -rm -t <username>/MySQL .

Run it:
# docker run -d -p 3306:3306 <username>/MySQL

Get container ID:
# docker ps

Keep in mind the password set for MySQL is: mysqlPassword
Get the IP address for the container:
# docker inspect <container_id> | grep -i ipaddr

For MySQL:
# mysql -h 172.17.0.x -utestdb -pmysqlPassword


Here's what it looks like:

Friday, January 10, 2014

Mirrored Github / FedoraHosted Repos

OK, so playing with git to mirror my dockerfiles.   I now have the:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Set up to mirror to:

https://github.com/scollier/Fedora-Dockerfiles

So now, users of both Fedora hosted git services and github can clone safely.  If ya run into any issues, please let me know.

Output of "git config -e":

********************************
[core]
  repositoryformatversion = 0
  filemode = false
  bare = false
  symlinks = false
  ignorecase = true
  hideDotFiles = dotGitOnly

[remote "fedorahosted"]
  url = ssh://<username>@git.fedorahosted.org/git/dockerfiles.git
  fetch = +refs/heads/*:refs/heads/*
  fetch = +refs/tags/*:refs/tags/*
  mirror = true

[remote "github"]
  fetch = +refs/heads/*:refs/remotes/origin/*
  url = git@github.com:<username>/Fedora-Dockerfiles.git
  mirror = true
  skipDefaultUpdate = true
********************************

I followed these instructions:

http://christoph.ruegg.name/blog/git-howto-mirror-a-github-repository-without-pull-refs.html