-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smashing Docker Container #40
Comments
A simple search on Docker Hub shows several attempts at setting up a Dashing/Smashing Docker Container. Personally, I really like this one: https://hub.docker.com/r/siweis/dashing/ |
@suhussai Yeah, there are lots of good containers for Dashing (not Smashing) that we can evaluate and borrow from. Can you please elaborate on what you like about the approach they use? Personally, I am not sure that using Alpine is the distro we want to use. However, I haven't really looked into this much. |
What I really like about the one from siweis is that it is really easy to setup and use. You build the container from the parent directory of the smashing project and the dockerfile simply pulls all the files into the container carrying all of the config files such as jobs, dashboards, widgets, etc. The current leading project https://hub.docker.com/r/frvi/dashing/ uses a different approach and it can be argued that that approach is a bit more flexible in that it allows you to pull in jobs, dashboards and other config files from different places on your computer, rather than just the directory you build the container in. It involves setting up a different volumes on the container to pull in the different config files. It also seems that gems must be passed in as an env variable. As for the choice to use Alpine, I think it might be to reduce the amount of space the container uses. Right now, the latest alpine is 4.8MB whereas the latest ubuntu is 129MB. What are some of the things that you'd like to see on the official smashing/dashing docker container? I'd be down to take a stab at writing up a draft for the dockerfile over the weekend. |
Sounds like you've looked into this quite a bit. I will play along and pretend I have no knowledge of this and also pretend to be amazed. Wow! 😉 Anyway, I want the container to be:
Acceptance Criteria:
|
@tylermauthe here is a first draft of the Dockerfile. I've got it setup on Dockerhub so you can test it out with the Dockerfile there. https://hub.docker.com/r/suhussai/containerized-smashing/ The instruction to run the container is the following:
Or if you want to run the default setup for the smashing dashboard, you can just run
It's been minimally tested, but I think the concept is sound so I want to show it here before moving forward with it. As you can see, its quite simple to get up and running. It combines elements of the previous dockerfiles I mentioned. No need for even a Dockerfile. The command above should pull the container down and using volumes, you can stick your dashboard in which will pull the config/jobs/widgets files and make them available for the container or just use the default setup. As for the things you mentioned. The way this Dockerfile is setup, its not meant to be used as a base image. It goes all the way in that it sets up your dashboard instead of the just environment for the dashboard. So if extensibility is so super important, this Dockerfile might need to be refactored. It is self-contained and relatively small. As you can see from the Dockerfile on docker hub, I am using Alpine. I've yet to test with any container orchestration engines. I'll work on the acceptance criteria after getting some feedback here. So, what do you think? |
Just gave it a brief look, it's a great start. I haven't tried it out yet, but a couple quick things I noticed:
- it's pulling in Dashing, not Smashing
- it's using volumes to mount the dashboard code -- I think it might be better to actually ship the code into the container for simplicity
… On Jan 16, 2017, at 11:27 AM, Syed Umair Hussain ***@***.***> wrote:
@tylermauthe here is a first draft of the Dockerfile. I've got it setup on Dockerhub so you can test it out with the Dockerfile there.
https://hub.docker.com/r/suhussai/containerized-smashing/
The instruction to run the container is the following:
# Run container
$ docker run -p 3030:3030 -v=/full/path/to/your/dashboard/:/dashboard suhussai/containerized-smashing
Or if you want to run the default setup for the smashing dashboard, you can just run
$ docker run -p 3030:3030 suhussai/containerized-smashing
It's been minimally tested, but I think the concept is sound so I want to show it here before moving forward with it.
As you can see, its quite simple to get up and running. It combines elements of the previous dockerfiles I mentioned. No need for even a Dockerfile. The command above should pull the container down and using volumes, you can stick your dashboard in which will pull the config/jobs/widgets files and make them available for the container or just use the default setup.
As for the things you mentioned. The way this Dockerfile is setup, its not meant to be used as a base image. It goes all the way in that it sets up your dashboard instead of the just environment for the dashboard. So if extensibility is so super important, this Dockerfile might need to be refactored.
It is self-contained and relatively small. As you can see from the Dockerfile on docker hub, I am using Alpine. I've yet to test with any container orchestration engines.
I'll work on the acceptance criteria after getting some feedback here.
So, what do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for taking a look @tylermauthe! Ah okay, so I'll replace About your second point, the way I have it designed allows for users to simply run the command I've indicated and get up and running. I think what you are referring to is likely to use the This is because the Dockerfile and the build context are difficult to segregate (I haven't found a way to do it.) i.e you can't use a Dockerfile located remotely along with a build context that is local. So to save users from having to create their own Dockerfile, no matter how minimal, I added the docker volume Hope that makes sense! |
I think it makes sense, I'll have to find some time to run it and play around with it to see if I like it. Thanks! |
Cool! No rush, I just wanted to get a solution out there. I am definitely open to new ideas to ensure that the needs of the project are met. |
#wishyouwerehere |
We are currently running Dashing on one of our servers and want to move everything to small Docker containers. Therefore I can help to test a Smashing Docker container if needed. |
Hey @derro, it'd be great if you could test the container on your environment! Here is the container we want to test out https://hub.docker.com/r/suhussai/containerized-smashing/ I've wrote up some instructions on the README there. You are probably going to want to test your own dashboard configuration so you want to run the following: docker run -p 3030:3030 -v=/full/path/to/your/dashboard/:/dashboard suhussai/containerized-smashing Let me know how it goes! |
For me this is working quite nice https://hub.docker.com/r/rgcamus/alpine_smashing/ |
Thanks for the reference @blackness90 Working great so far. |
rgcamus forked worked great..untill it didn't. We're running in kubernetes and use a git-sync sidecar container to copy a repo into the smashing container. However, the rgcamus fork wanted a bunch of individual mounts when git-sync just wanted to export the one. And since the repo is a full smashing project for local development, having it create a new project and link in all the directories didn't make sense. github.com/reverbnation/alpine_smashing just expects one volume with a full project. The container should rarely need to be rebuilt and could probably be replace with a generic ruby alpine with some onbuild commands. YMMV |
That is exactly the reason I want everything required to run your dashboard shipped inside the container. No mounts, no problems. Everything needed to run a dashboard is pretty small. It can be done! |
@sjernigan @tylermauthe This docker hub repo: https://hub.docker.com/r/siweis/dashing/ might be what you guys are looking for. According to the README:
I've used it before and it's easy to get started. It also doesn't require any mounts, but it does require a simple Dockerfile however. |
I can definitely see something like that working and understand the justifications in many cases for having a self-contained deployable container. We take this approach for many of our containers that are scaled, need rollback, blah blah blah. |
My goal is to make something that is as simple as possible. Other containers exist, please feel free to use them or build your own. For the officially supported container, I want something that anybody can use in any situation. Simplicity is key. This is all in an effort to minimize support requests. Typical support requests are issued by people who don't know Ruby or modern operational tooling. Heck they often don't even read the contribution guidelines. I want to have two steps: install Docker and start your container. Slow builds won't generate support requests. |
Two steps...I think you left out the git checkout but perhaps you want a demo container that can't be altered. So maybe we are saying the same thing cause that what I have (install docker, git checkout, run with volume mount). I thought you were arguing for an additional container build step(s) to get the user's code into the container (without a volume mount). |
I tried a lot of dashing docker containers of the posted ones in the comments. Does anyone already tried this and got this working? I also tried to alter the Dockerfile to use the files from an external source but I wasn't able to get this working. |
Derro, As you can see by tylermauthe's comments, this is not official....but if you had a smashing project created at ~/smashing, you should be able to run docker run -d -p 3030:3030 -v ~/smashing:/etc/git_repo/smashing quay.io/reverbnation/alpine-smashing:latest wait a second for bundler to run and then open a browser to localhost:3030 to see your dashboard. |
Is there an "official" Docker image for Smashing? See a few on Docker Hub, wondering which is "recommended". (sorry for posting in an old issue) |
@ScottBrenner Not sure if there's an official but I've been using visibilityspots/smashing with decent success. |
Hey @tylermauthe! Long time no speak! Hope all has been well since last time we were in touch! :) Is there, and if so which is, an 'official' docker container for this project ? I'll 2nd @ScottBrenner's question here, and push for a 'recommended' instance! -Thanks. |
@MartynKeigher I ended up forking this slightly and creating my own. |
There are several Docker containers for Dashing, we should investigate them and take the best bits to make an official Smashing container.
The text was updated successfully, but these errors were encountered: