tag:blogger.com,1999:blog-80750344081931705402024-09-09T19:40:29.840-07:00Middle East LinuxWalid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]Blogger11125tag:blogger.com,1999:blog-8075034408193170540.post-64442238053493588442017-12-05T09:29:00.001-08:002017-12-05T09:35:51.916-08:00<div dir="ltr" style="text-align: left;" trbidi="on"> My first time to FOSDM 2017:<br /> <br /> This was written earlier on Feb. however, I never had the time to finish it. lots have happened since then, and soon FOSDEM 2018 will be around. so here it is raw incomplete:<br /> <br /> I have made it. &nbsp;I have attended most of what I wanted to attend today, even though I came late, tired and was worried that I will catch a cold/flu that my fellow passenger had. My first flight to Dubai was delayed due to adverse weather conditions, heavy rains. Caused me lose my flight to Brussels, demanded that I need to be there as it was a crucial event for me. A moment to cherish in my life of open source fan.<br /> <br /> So First I used the city mapper app for Brussels, and it recommends or uses ecab. ecab is useless, could not find me a suitable Taxi on time. So, switched to Uber, and voila, my ride was ready in a couple of minutes, dropped me near the info desk where I bought my FOSDEM 2017 shirt, not a hoodie, I had to go to another info desk, but there was no time the keynote is already starting on J<br /> <br /> <br /> Lessons Learned:<br /> <br /> Get Familiar with the university campus rooms, especially talks you want to attend if they are not in the same room.<br /> <br /> Be in the room as early if possible, if the talk is really important, attend one talk earlier. I was so disappointed to miss the HPC talk, even though I was 30 mins earlier, there was already a queue, and the room was full. if I came to a talk earlier, I would have made it.<br /> <br /> The general guest wifi connection is not that reliable, and my roaming restricting me to one telecom network, ensure that you have your favourite talks printed hardcopy, and which room. there was something about not buying a Belgium sim card unless you buy it 1 working day in advance as its data package will not be active straight away if you are thinking using a local data package.<br /> <br /> Food as in snacks and drinks are almost everywhere.<br /> <br /> <br /> <br /> <br /></div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]0tag:blogger.com,1999:blog-8075034408193170540.post-11795172068221647762016-12-03T07:50:00.000-08:002016-12-09T07:18:41.230-08:00Dhahran-Docker November 2016 meetup<div dir="ltr" style="text-align: left;" trbidi="on"> On Wednesday, 16th November, Dhahran Docker meetup participated&nbsp;in <a href="https://blog.docker.com/2016/10/docker-global-mentor-week-2016/">the global #learndocker event "Global Mentor Week."</a> two useful resources that were used to some extent were <a href="http://play-with-docker.com/" target="_blank">PWD: Play With Docker</a>&nbsp;and <a href="https://www.katacoda.com/learn">Katacoda</a>.<br /> <br /> There were lots of questions asked during and after the meetup. So here I am trying to capture to the best of my knowledge Docker and containers questions and some of the answers for the future meetup mentors as a taste of things to come, I will &nbsp;try to update and answer more questions, however I encourage joining the Docker<a href="https://community.docker.com/registrations/groups/4316"> community Slack channel</a> and <a href="https://forums.docker.com/">Forum </a>for any further questions.<br /> <br /> <iframe allowfullscreen="" frameborder="0" height="485" marginheight="0" marginwidth="0" scrolling="no" src="//www.slideshare.net/slideshow/embed_code/key/90S0Q5ubSvxY2P" style="border-width: 1px; border: 1px solid #ccc; margin-bottom: 5px; max-width: 100%;" width="595"> </iframe> <br /> <div style="margin-bottom: 5px;"> <strong> <a href="https://www.slideshare.net/Alshaari/docker-dhahran-nov-2016-meetup" target="_blank" title="Docker Dhahran Nov 2016 meetup">Docker Dhahran Nov 2016 meetup</a> </strong> from <strong><a href="https://www.slideshare.net/Alshaari" target="_blank">Walid Shaari</a></strong> </div> <br /> <h3 style="text-align: left;"> Technical:</h3> <h4 style="text-align: left;"> Q: I am still confused what is the difference between image, and containers, aren't&nbsp;container and image both the same thing?</h4> A: Think of the image is the golden template, and when Docker run it, it creates an instance of it in memory with the required customization "port exposed, environment variables set to configure an aspect, volumes bound, network connected,.., etc"; &nbsp;when the process/container is done, it still exists but now in disk, in case you need to create a &nbsp;template from it, otherwise one needs to clean them up periodically. Although that question seems easy to answer, it was the most asked question from everyone at some time;<br /> <br /> from&nbsp;<a href="http://stackoverflow.com/questions/23735149/docker-image-vs-container">Stackoverflow.com docker-image-vs-container</a><br /> <br /> <h2 style="background-color: white; border: 0px; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 19px; font-weight: 400; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; word-wrap: break-word;"> Docker Images vs. Containers</h2> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> In Dockerland, there are&nbsp;<strong style="border: 0px; margin: 0px; padding: 0px;">images</strong>, and there are&nbsp;<strong style="border: 0px; margin: 0px; padding: 0px;">containers</strong>. The two are closely related, but distinct. For me, grasping this dichotomy has clarified Docker immensely.</div> <h3 style="background-color: white; border: 0px; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 17px; font-weight: 400; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; word-wrap: break-word;"> What's an Image?</h3> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> An image is an inert, immutable, file that's essentially a snapshot of a container. Images are created with the&nbsp;<a href="http://docs.docker.com/reference/commandline/cli/#build" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">build</a>&nbsp;command, and they'll produce a container when started with a&nbsp;<a href="https://docs.docker.com/reference/run/" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">run</a>. Images are stored in a Docker registry such as&nbsp;<a href="https://registry.hub.docker.com/" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">registry.hub.docker.com</a>. Because they can become quite large, images are designed to be composed of layers of other images, allowing a minimal amount of data to be sent when transferring images over the network.</div> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Local images can be listed by running&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker images</code></div> <pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ubuntu 13.10 5e019ab7bf6d 2 months ago 180 MB ubuntu 14.04 99ec81b80c55 2 months ago 266 MB ubuntu latest 99ec81b80c55 2 months ago 266 MB ubuntu trusty 99ec81b80c55 2 months ago 266 MB &lt;none&gt; &lt;none&gt; 4ab0d9120985 3 months ago 486.5 MB </code></pre> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> <strong style="border: 0px; margin: 0px; padding: 0px;">Some things to note:</strong></div> <ol style="background-color: white; border: 0px; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin: 0px 0px 1em 30px; padding: 0px;"> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;">IMAGE ID is the first 12 characters of the true identifier for an image. You can create many tags of a given image, but their IDs will all be the same (as above).</li> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;">VIRTUAL SIZE is&nbsp;<em style="border: 0px; margin: 0px; padding: 0px;">virtual</em>&nbsp;because its adding up the sizes of all the distinct underlying layers. This means that the sum of all the values in that column is probably much larger than the disk space used by all of those images.</li> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;">The value in the REPOSITORY column comes from the&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">-t</code>&nbsp;flag of the&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker build</code>command, or from&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker tag</code>-ing an existing image. You're free to tag images using a nomenclature that makes sense to you, but know that Docker will use the tag as the registry location in a&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker push</code>&nbsp;or&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker pull</code>.</li> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;">The full form of a tag is&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">[REGISTRYHOST/][USERNAME/]NAME[:TAG]</code>. For above<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">ubuntu</code>, REGISTRYHOST is inferred to be&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">registry.hub.docker.com</code>. So if you plan on storing your image called&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">my-application</code>&nbsp;in a registry at&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker.example.com</code>, you should tag that image&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker.example.com/my-application</code>.</li> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;">The TAG column is just the [:TAG] part of the&nbsp;<em style="border: 0px; margin: 0px; padding: 0px;">full</em>&nbsp;tag. This is unfortunate terminology.</li> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;">The&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">latest</code>&nbsp;tag is not magical, it's simply the default tag when you don't specify a tag.</li> <li style="border: 0px; margin: 0px; padding: 0px; word-wrap: break-word;">You can have untagged images only identifiable by their IMAGE IDs. These will get the&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">&lt;none&gt;</code>&nbsp;TAG and REPOSITORY. It's easy to forget about them.</li> </ol> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> More info on images is available from the&nbsp;<a href="https://docs.docker.com/engine/reference/commandline/images/" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">Docker docs</a>&nbsp;and&nbsp;<a href="https://docs.docker.com/engine/reference/glossary/#image" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">glossary</a>.</div> <h3 style="background-color: white; border: 0px; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 17px; font-weight: 400; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; word-wrap: break-word;"> What's a container?</h3> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> To use a programming metaphor, if an image is a class, then a container is an instance of a class—a runtime object. Containers are hopefully why you're using Docker; they're lightweight and portable encapsulations of an environment in which to run applications.</div> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> View local running containers with&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker ps</code>:</div> <pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f2ff1af05450 samalba/docker-registry:latest /bin/sh -c 'exec doc 4 months ago Up 12 weeks 0.0.0.0:5000-&gt;5000/tcp docker-registry </code></pre> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Here I'm running a dockerized version of the docker registry, so that I have a private place to store my images. Again, some things to note:</div> <ol style="background-color: white; border: 0px; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin: 0px 0px 1em 30px; padding: 0px;"> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;">Like IMAGE ID, CONTAINER ID is the true identifier for the container. It has the same form, but it identifies a different kind of object.</li> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;"><code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker ps</code>&nbsp;only outputs&nbsp;<em style="border: 0px; margin: 0px; padding: 0px;">running</em>&nbsp;containers. You can view&nbsp;<em style="border: 0px; margin: 0px; padding: 0px;">stopped</em>&nbsp;containers with&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker ps -a</code>.</li> <li style="border: 0px; margin: 0px; padding: 0px; word-wrap: break-word;">NAMES can be used to identify a started container via the&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">--name</code>&nbsp;flag.</li> </ol> <h3 style="background-color: white; border: 0px; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 17px; font-weight: 400; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; word-wrap: break-word;"> How to avoid image and container buildup?</h3> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> One of my early frustrations with Docker was the&nbsp;<strong style="border: 0px; margin: 0px; padding: 0px;">seemingly constant buildup of untagged images and stopped containers</strong>. On a handful of occassions this buildup resulted in maxed out hard drives slowing down my laptop or halting my automated build pipeline. Talk about "containers everywhere"!</div> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> We can remove all untagged images by combining&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker rmi</code>&nbsp;with the recent&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">dangling=true</code>query:</div> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> <code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker images -q --filter "dangling=true" | xargs docker rmi</code></div> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Docker won't be able to remove images that are behind existing containers, so you may have to remove stopped containers with&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker rm</code>&nbsp;first:</div> <pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">docker rm `docker ps --no-trunc -aq` </code></pre> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> These are&nbsp;<a href="https://github.com/docker/docker/issues/928" rel="nofollow" style="border: 0px; color: #005999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;">known pain points</a>&nbsp;with Docker, and may be addressed in future releases. However, with a clear understanding of images and containers, these situations can be avoided with a couple of practices:</div> <ol style="background-color: white; border: 0px; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin: 0px 0px 1em 30px; padding: 0px;"> <li style="border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;">Always remove a useless, stopped container with&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker rm [CONTAINER_ID]</code>.</li> <li style="border: 0px; margin: 0px; padding: 0px; word-wrap: break-word;">Always remove the image behind a useless, stopped container with&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker rmi [IMAGE_ID]</code></li> </ol> more from&nbsp;<a href="http://stackoverflow.com/questions/21498832/in-docker-whats-the-difference-between-a-container-and-an-image">Stackoverflow "whats-the-difference-between-a-container-and-an-image"</a><br /> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> <br /></div> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Images are frozen immutable snapshots of live containers. Containers are running (or stopped) instances of some image.</div> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Start with the base image called 'ubuntu'. Let's run bash interactively within the ubuntu image and create a file. We'll use the&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">-i</code>&nbsp;and&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">-t</code>&nbsp;flags to give us an interactive bash shell.</div> <pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">$ docker run -i -t ubuntu /bin/bash root@48cff2e9be75:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var root@48cff2e9be75:/# cat &gt; foo This is a really important file!!!! root@48cff2e9be75:/# exit </code></pre> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Don't expect that file to stick around when you exit and restart the image. You're restarting from exactly the same defined state as you started in before, not where you left off.</div> <pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">$ docker run -i -t ubuntu /bin/bash root@abf181be4379:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var root@abf181be4379:/# exit </code></pre> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> But, the container, now no longer running, has state and can be saved (committed) to an image.</div> <pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES abf181be4379 ubuntu:14.04 /bin/bash 17 seconds ago Exited (0) 12 seconds ago elegant_ardinghelli 48cff2e9be75 ubuntu:14.04 /bin/bash About a minute ago Exited (0) 50 seconds ago determined_pare ... </code></pre> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Let's create an image from container ID 48cff2e9be75 where we created our file:</div> <pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">$ docker commit 48cff2e9be75 ubuntu-foo d0e4ae9a911d0243e95556e229c8e0873b623eeed4c7816268db090dfdd149c2 </code></pre> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Now, we have a new image with our really important file:</div> <pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">$ docker run ubuntu-foo /bin/cat foo This is a really important file!!!! </code></pre> <div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; margin-bottom: 1em; padding: 0px;"> Try the command&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">docker images</code>. You should see your new image&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">ubuntu-foo</code>&nbsp;listed along with the&nbsp;<code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">ubuntu</code>&nbsp;standard image we started with.</div> <br /> <br /> <h4 style="text-align: left;"> Q: the "<b>FROM</b>" directive in <i>Dockerfile, </i>Shouldn't the best practice pin the image with a tag?</h4> <br /> A: Yes, I think it would be a good practice to pin the base image in the <u>FROM directive</u> line in Dockerfile. The reasoning is the default is latest, that could mean if someone rebuilds the image again, he is not guaranteed original functionality as things might have changed in future base images that might affect the other layers, not guaranteed security also if it will be pulled from non-trusted repository/hub.<br /> <br /> <h4 style="text-align: left;"> Q: What if my image was compiled with optimisation in mind, would that work with another platform that does not have the instruction set?</h4> No, it would not work, &nbsp;if one is targeting portability, he will build the image for the lowest denominator with no special platform specific compiler flags. There could be internal Enterprise use cases where different builds of the containers for particular platform, tags could be used to distinguish such images.<br /> <h4 style="text-align: left;"> Q: How would containers help us startups? Do you have use cases?</h4> <div> <div> Docker history has some good lessons to learn from, Docker by itself is a good use case. When Solomon Hykes the Docker founder started up <a class="" href="https://techcrunch.com/2010/12/22/yc-funded-dotcloud-an-application-platform-that-lets-you-mix-and-match/">dotcloud</a> in Y Combinator and how the <a class="" href="https://techcrunch.com/2010/12/22/yc-funded-dotcloud-an-application-platform-that-lets-you-mix-and-match/">dotcloud</a> team was supporting other Y Combinator startups build, deploy and ship their apps into AWS, and <a href="http://www.forbes.com/sites/alexkonrad/2015/07/01/how-docker-escaped-near-death-to-become-softwares-next-big-thing/">the 20 startups from YC that adopted Docker early</a>. <a href="http://www.trinityventures.com/pivot-worked-docker-story/">Check out the origin story of dotcloud and how it transformed to Docker</a>.<br /> <br /> Also, the rich Docker Hub app repository, regarding application subsystems, and ready components. If one have an idea how to help a customer, it can be fast and easy to prototype into a fully working application or build an appliance. The entire Docker Ecosystem to create a full working operational and development workflow for the prototype and help the application scale.<br /> <div> <br /></div> In most cases, containers are an alternative to virtual machines. So it's easier to talk to people that already have virtual machines in use as they can relate. Containers could prove faster, more performant, and easy to manage.<br /> <br /> One case I had seen recently with<a href="https://goo.gl/14QRjR"> Zenoss when they moved their architecture</a> to Docker containers, it helped them ship a standalone version of a complex distributed application in a scalable, manageable approach. That customers can install Zenoss behind their firewall. The <a href="https://goo.gl/14QRjR">Zenoss distributed architecture </a>is very complicated, it uses a mix of many solutions, but still user's the whole installation, upgrade, and management experience have been inspiring.&nbsp;</div> <div> <br /></div> <div> <h4 style="text-align: left;"> How does Docker differ or relate to vagrant? How about docker-machine vs. vagrant?</h4> The essence of Docker is the a-z of the software application lifecycle regarding build, ship, and run; that could be in any environment, development, production, QA, and could be multiple of environments mixed. Vagrant, on the other hand, is meant to be mainly for development, the Vagrant file is more or less like &nbsp;the Docker compose YAML file describes the environment setup but doesn't describe how &nbsp;the application instances or images are created, in Docker the images can be described using Dockerfile if not pulled from a registry/repository/Docker hub.<br /> <br /></div> <div> <h4 style="text-align: left;"> How can swarm allocate a container that might later overuse memory resources of the host?</h4> </div> <div> How does Docker hub ensure images pushed to are lawfully licensed?<br /> <br /></div> <div> Some questions related to differences between images and containers</div> <div> some questions when to use virtualizations vs. container or can one use both?&nbsp;</div> <div> Will it be possible to run Windows containers on Linux platform, or the opposite without docker-machine?</div> <div> Can one enforce network usage limits,? Bandwidth on a container?<br /> Not yet in current Docker versions at the time of this blog writing. There are several closed/open Github issues related to throttling/limiting network bandwidth for a container. &nbsp;For example, <a href="https://github.com/shivacherukuri/Docker-Network-Bandwidth">Github shivacherukuri Docker-Network-Bandwidth solution</a>&nbsp;is one way to go about it.<br /> <br /></div> <div> One questions about build Docker images for a legacy app that its container size reached 10G in size have asked him to follow up with me with details?</div> <div> <br /> <h4 style="text-align: left;"> What is the size limit or expectations of container size?</h4> </div> <div> it depends on the storage driver, Docker version used, and file system limits. for example for Docker 1.10+ and devicemapper it can be increased over 10G:&nbsp;<a href="http://www.projectatomic.io/blog/2016/03/daemon_option_basedevicesize/">Docker 1.10 daemon option to increase the basedevice size</a><br /> <h4 style="text-align: left;"> </h4> </div> <div> <br /> <h4 style="text-align: left;"> Questioning the numbers of 7B+ downloads, the percentage of Docker in production? Having access to the application survey would have helped.?</h4> <br /> As for the downloads number these were from Docker Hub, and most of it is the community images, a <a href="https://store.docker.com/search?page_size=99&amp;q=&amp;source=community">quick search today</a> in the newly store, shows around 439,440 community images, and as one can see captured image below, some of these images had already been downloaded over 10M+ times<br /> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilrB3QpsZAa65MhMcbacvkcW9gShVdj0HqSZEdHfVQLqAN6wUiXXjA94wgo4LofreFnUHB52_Rx0IaxnS1iVmylcfgZE7yixew8QPruanXTjk4RImt_5xK7m1xjemmn4gzCTaBQ0yT1eo/s1600/Screen+Shot+2016-12-03+at+6.09.32+PM.png" style="margin-left: 1em; margin-right: 1em;"><img alt="Docker Store showing community images with 10M+ downloads" border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilrB3QpsZAa65MhMcbacvkcW9gShVdj0HqSZEdHfVQLqAN6wUiXXjA94wgo4LofreFnUHB52_Rx0IaxnS1iVmylcfgZE7yixew8QPruanXTjk4RImt_5xK7m1xjemmn4gzCTaBQ0yT1eo/s400/Screen+Shot+2016-12-03+at+6.09.32+PM.png" title="Docker Store showing community images with 10M+ downloads" width="400" /></a></div> <br /> there are several surveys done that report different statics regarding the adoption of Docker in production and in the Enterprise, however, all of them almost agree on the rate of growth of using Docker in production. one good resource discussing some of these statistics earlier this year is<br /> <a href="http://www.coscale.com/blog/docker-usage-statistics-increased-adoption-by-enterprises-and-for-production-use">Coscale Docker usage statistics increased adoption by enterprises and for production use</a><br /> <br /> Some other example surveys:<br /> <ul style="text-align: left;"> <li>https://clusterhq.com/assets/pdfs/state-of-container-usage-june-2016.pdf</li> <li>https://redmonk.com/fryan/2016/12/01/containers-in-production-is-security-a-barrier-a-dataset-from-anchore/</li> <li>https://www.datadoghq.com/docker-adoption/</li> <li>https://www.cloudfoundry.org/wp-content/uploads/2016/06/Cloud-Foundry-2016-Container-Report.pdf</li> </ul> </div> <div> All these numbers are obsolete by now due to the rapid growth Docker and containers, in general, are seeing.<br /> <br /> <h3 style="text-align: left;"> Non-technical &nbsp;questions:</h3> <h4 style="text-align: left;"> </h4> <h4 style="text-align: left;"> I did register for the Docker community, I do not see the general/ Global-Mentor-Week channel?</h4> <div> <br /></div> <div> After you sign up for the&nbsp;<a href="https://community.docker.com/registrations/groups/4316">Docker community group</a>, you will get in your email a&nbsp;<a href="https://dockercommunity.slack.com/messages">Slack</a>&nbsp;invite, this is a manual process and could take some from few hours to a couple of days. Also double check your spam folder for any Docker/Slack related emails.&nbsp;</div> <h4> </h4> <h4> &nbsp;Can I download the training instructions offline?</h4> <div> <br /></div> <div> I have raised the question in Docker community slack. &nbsp;However, all training is now accessible free online; you should note that the practice is based on&nbsp;<a href="https://github.com/docker/labs">Docker community GitHub repos</a>&nbsp;for the development course check it out at &nbsp;<a href="https://github.com/docker/labs">Docker Github Labs</a>, as for the operations, you can find it here&nbsp;<a href="https://github.com/jpetazzo/orchestration-workshop">Docker Orchestration Workshop</a></div> <h3 style="text-align: left;"> <div> <br /></div> </h3> <h4> Some business related questions to local support, and resellers/partnerships in Saudi?</h4> <div> <br /></div> <div> check &nbsp;https://www.docker.com/docker-support-services#/faq and email [email protected]</div> <h3 style="text-align: left;"> </h3> <h3 style="text-align: left;"> Other questions:</h3> <h4 style="text-align: left;"> </h4> <h4 style="text-align: left;"> Why the voter app breaks build breaks in Linux platform but does not on Windows? And using proposed solution makes the app not function right?</h4> </div> <div> <h4 style="text-align: left;"> </h4> <h4 style="text-align: left;"> What is the percentage of serious critical/stateful business enterprise applications compared to web/cloud apps? Is Docker mostly for web/cloud apps?</h4> </div> <div> <h4 style="text-align: left;"> </h4> <h4 style="text-align: left;"> Will there be professional certifications and exams on Docker ECO system?</h4> </div> <div> As far as I know, Red Hat have some courses and exams:</div> <div> <a href="https://www.redhat.com/en/services/training/do277-containerizing-software-applications-exam">https://www.redhat.com/en/services/training/do277-containerizing-software-applications-exam</a></div> <div> <br /></div> <div> <a href="https://www.redhat.com/en/services/training/do277-containerizing-software-applications-exam"><br /></a></div> <div> As well as &nbsp;Mirantis&nbsp;:&nbsp;<a href="https://training.mirantis.com/instructor-led-training/kubernetes-and-docker-certification-exam-kdc100">Mirantis instructor-led training for kubernetes and Docker certification exam kdc100</a></div> <div> <h4 style="text-align: left;"> </h4> <h4 style="text-align: left;"> Doing an ldd/pmap inside a container, how can the view from inside the container relate to the outside view from the host system, and what is static vs. dynamic in here?</h4> </div> </div> </div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]1Dhahran Saudi Arabia26.2361248 50.0393017000000125.7803258 49.393854700000013 26.691923799999998 50.684748700000007tag:blogger.com,1999:blog-8075034408193170540.post-69229084256592761142016-12-02T12:56:00.000-08:002017-12-05T09:26:37.585-08:00Devops and traditional HPC<div dir="ltr" style="text-align: left;" trbidi="on"> <div dir="ltr" style="text-align: left;" trbidi="on"> <div dir="ltr" style="text-align: left;" trbidi="on"> Last April, I have co-presented in Saudi HPC 2016 a short talk titled <a href="http://www.slideshare.net/Alshaari/what-hpc-can-learn-from-devops">"What HPC can learn from DevOps."</a>&nbsp;It was meant to bring awareness to DevOps culture and mindset to HPC practitioners. Following day, the talk was complemented by an<a href="http://www.slideshare.net/Alshaari/docker-saudi-hpc2016" target="_blank"> Introductory tutorial to containers</a>. This talk and tutorial were my second contribution promoting DevOps locally. The first attempt was In <a href="https://prezi.com/uryltgdqdy-w/saudi-devops-2013-afternoon-intro/" target="_blank">Saudi HPC 2013 with the DevOps afternoon</a>; in which we had speakers from <a href="https://www.youtube.com/watch?v=_bh7uzQxRpk">Puppet</a> and <a href="https://www.youtube.com/watch?v=pyCnl9mHAFk">Ansible</a> with good examples back then of how automation <a href="https://devops.com/meet-infrastructure-code/">"Infrastructure as code"</a> frameworks encourage communications, visibility and feedback loops within the organisation.<br /> <br /> <h3 style="text-align: left;"> <b>Talk Abstract:</b>&nbsp;</h3> <div style="text-align: left;"> Cloud, Web, Big Data operations and DevOps mindsets are changing the Internet, IT and Enterprise services and applications scene rapidly. What can HPC community learn from these technologies, processes, and culture? From the IT unicorns "<a href="https://cloud.google.com/solutions/architecture/highperformancecomputing" target="_blank">Google</a>, <a href="https://code.facebook.com/posts/" target="_blank">Facebook</a>, <a href="https://www.youtube.com/user/TwitterUniversity" target="_blank">Twitter</a>, <a href="https://engineering.linkedin.com/blog" target="_blank">Linkedin</a>, and <a href="https://codeascraft.com/" target="_blank">Etsy</a>" that are in the lead? What could be applied to tackle HPC operations challenges? The problem of efficiency, better use of resources? A use case of automation and version control system in HPC enterprise data centre, as well a proposal for utilising containers and new schedulers to drive better utilizations and diversify the data centre workloads, not just HPC but big data, interactive, batch, short and long-lived scientific jobs.<br /> <br /> Here are some of my personal talk notes at that time. Apparently, they did not fit the 15 minutes window I was given.<br /> <br /> <br /> <iframe allowfullscreen="" frameborder="0" height="485" marginheight="0" marginwidth="0" scrolling="no" src="//www.slideshare.net/slideshow/embed_code/key/1mcu3ogT9N8mPT" style="border-width: 1px; border: 1px solid #ccc; margin-bottom: 5px; max-width: 100%;" width="595"> </iframe> <br /> <div style="margin-bottom: 5px;"> <strong> <a href="https://www.slideshare.net/Alshaari/what-hpc-can-learn-from-devops" target="_blank" title="What HPC can learn from DevOps?">What HPC can learn from DevOps?</a> </strong> from <strong><a href="https://www.slideshare.net/Alshaari" target="_blank">Walid Shaari</a></strong></div> </div> </div> </div> <h3 style="text-align: left;"> Talk reflections and thought points:</h3> <div> <div class="MsoNormal" style="text-align: left;"> <b><br /></b> <b>Definitions:</b> Presenting the different possible HPC workloads: <a href="https://en.wikipedia.org/wiki/High-throughput_computing">HTC</a>, <a href="https://en.wikipedia.org/wiki/Supercomputer">HPC</a>, <a href="http://highscalability.com/start-here/">HSC</a>, and the recent trend in Data Centre convergence by considering BigData “Analytics” and more recently MLDM “Machine learning, Data mining.” Highlighting the diversity and variability of HPC workload, then moving to what <a href="https://en.wikipedia.org/wiki/DevOps">DevOps</a> means to HPC, Why it did not pick up as much? What HPC can learn from Enabling, cloud, and Big Data operations?<br /> <b><br /></b> <b>The disconnect:&nbsp;</b><span style="color: #222222; font-family: &quot;arial&quot; , sans-serif;">Traditional HPC software changes are infrequent; HPC does not need to be agile handling frequent continuous deployments. Each HPC cluster deployment is a snowflake unique in its way, making it hard for group users to port their work to other clusters, a process that takes days, weeks, often months. &nbsp;The concept of application instrumentation and performance monitoring is not the norm, nor the plumbing and CI/CD pipelines.</span><br /> <span style="color: #222222; font-family: &quot;arial&quot; , sans-serif;"><br /></span> <b style="font-family: arial, sans-serif;">The motivation:&nbsp;</b><span style="font-family: &quot;arial&quot; , sans-serif;">However, HPC infrastructures inevitably have to grow, innovations in HPC hardware <a href="http://insidehpc.com/2016/01/the-death-and-life-of-traditional-hpc" target="_blank">requires a new look into HPC software deployments and development</a>, HPC data centres will need them few highly skilled operational engineers to scale operations with fewer resources efficiently. The defragmented <a href="http://www.lifelinedatacenters.com/data-center/right-approach-lean-data-centers/">use of system resources needs to be optimised</a>. The scientific and business applications might be rearranged, refactored, reworked to consider better workflows. Analysing application and data processing stages and dependencies looking at them as a whole and connected parts while avoiding compartmentalization and infrastructure silos.</span><br /> <b><br /></b> <b>The scalability Challenge:</b> What could be the primary HPC driver to introduce DevOps culture and tooling? &nbsp;Can't stress enough on scalability (the imminent growth due to initiative like national grids, and International Exascale computing, the workload, number of nodes, number of personalities or roles an HPC node might take)<br /> <b><br /></b> <b>DevOps tools:</b> Emphasise richness of the tool set and culture that have driven tools evolution. Pointing out it is not about the tools, more than the concepts that tools enable. Not just automation, building, shipping and delivery workflows, but the ever engaging feedback loops, the collaboration, ease because of integration, highlight that communication and feedback are not just the human face-to-face but also the meaningful dashboards and actionable metrics, &nbsp;the importance of code reviews, the rich API, the natural UX. &nbsp;Such comprehensive set of tools and unlike the current HPC defragmented alternatives or in some cases Enterprise tools used wrongly for HPC.<br /> <b><br /></b> <b>Use case of differences:</b> &nbsp;The case of Provisioning; and how the terminology differs between the HPC and web/cloud communities. Taking this example&nbsp;further to pivot to the false assumptions of HPC can be just bare-metal provisioning.<br /> <b><br /></b> <b>Validation:</b> Validation of the hypothesis of serious HPC workload in the cloud, and recent use cases for containers deployment in HPC from surveys and production ready vendor solution trending the last couple of years may be present some of the related <a href="http://insidehpc.com/category/hpc-software/cloud-hpc/" target="_blank">HPC cloud news</a>.<br /> <b><br /></b> <b>2nd Generation Data Centre provisioning tools: </b>Alternatives, offer open source alternatives to traditional HPC provisioning tools and highlight their diversity in handling bare-metal, virtual images instances, and containers. As well the possibilities for combining this with diskless and thing OS hosts.<br /> <b><br /></b> <b>The current state of the HPC Data Centre: &nbsp;</b>Highlight the problem of static partitioning (silos), and the various workload needed to either support or&nbsp;<span style="background-color: #f5f6f5;">complement&nbsp;</span>the bigger business/scientific application and discuss valid reasons of partitioning.<br /> <br /> <b>Resource Abstraction: &nbsp;</b>What if we abstract the data centre resources, and break down the silos? How should that be done? &nbsp;What core components need to be addressed? Why? Present an example&nbsp;<a href="https://www.youtube.com/watch?v=Q4tcEVr8lPg" target="_blank">proposal of such tooling</a> with the reasoning behind it.<br /> <b><br /></b> <b>Unit of change: &nbsp;</b>Containers technology is a useful enabling technology for such problems. Does not have the performance overhead issues that HPC shied away from in virtualisation related solutions, and will enable portability for the various&nbsp;HPC workload deployments. Not to mentions the richness of its ecosystem to enhance the current status quo of scheduling, resources, and workload management to greater levels of efficiency and better utilisation of Data Centre resources.<br /> <br /> <b>The software-defined data Centre: &nbsp;</b>Everything so far can be either code or managed and monitored by code. How flexible is that? And what new opportunities it brings? &nbsp;How can everything be broken down into components? How parts integrate and fit together? enabling a “Lego style” Compose-able infrastructure driven and managed by code, policies, and desired state models. How has code opened new possibilities to stakeholders?<br /> <br /> <b><br /></b> <b><a href="http://qnib.org/data/isc2016/2_docker_drivers.pdf" target="_blank">Some Docker evaluation use cases:</a></b><br /> <b><br /></b> <b>Challenges ahead: </b>The road ahead expectations? The unique differences and requirements? &nbsp;Which underlying container technologies need to be in place and for what? &nbsp;The right amount of namespace isolation vs. cgroups control, how about <a href="https://linuxcontainers.org/" target="_blank">LXC</a>, <a href="https://www.ubuntu.com/cloud/lxd" target="_blank">LXD</a>, <a href="http://singularity.lbl.gov/" target="_blank">Singularity</a>, Docker? What would we see coming next?<br /> <br /> <blockquote class="twitter-tweet" data-lang="en"> <div dir="ltr" lang="en"> In the future we'll see more container runtimes, not less, purpose built for the target application platform, and largely invisible.</div> — Kelsey Hightower (@kelseyhightower) <a href="https://twitter.com/kelseyhightower/status/804791889530527744">December 2, 2016</a></blockquote> <br /> The importance of having the right mindset to evaluate, experiment new paradigms and technologies, eventually deploy and utilise them in production; introduce new workflows, enable better communication between the different teams (developers, users, security, operations, business stakeholders). The concept of indirection and abstraction to solve computer problems, in this case, the 2-level indirection scheduling for granular resource management. The container unit concept for the workload is not just for applications; it could also be for data.<br /> <br /> to be continued ...<br /> <br /> <b>References:</b><br /> <b><br /></b> https://blog.ajdecon.org/the-hpc-cluster-software-stack/<br /> http://sebgoa.blogspot.com/2012/11/i-was-asked-other-day-what-was.html<br /> http://qnib.org/data/isc2016/2_docker_drivers.pdf<br /> <br /></div> </div> <br /></div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]1tag:blogger.com,1999:blog-8075034408193170540.post-45044942241881237452014-03-22T23:39:00.000-07:002014-03-22T23:39:07.160-07:00<div dir="ltr" style="text-align: left;" trbidi="on"> <h2 style="text-align: left;"> <span style="font-size: small;">What if Ansible Run Hangs?</span></h2> Running &nbsp;Ansible against 1000s of nodes, not fully aware of some of the node status before the run, some were heavily loaded, and busy, some were down. such highly loaded of &nbsp;OOM nodes or even some of the play-book tasks are prone to wait, and blockage, all of these conditions will cause Ansible to hang. below are some of the steps that I followed or were collected from Ansible mailing list* to help debug such a hang:<br /> <h3 style="text-align: left;"> <span style="font-size: small;">Is it the initial connection?</span></h3> <div style="text-align: left;"> use -vvvv to trouble shoot the connection</div> <br /> <h3 style="text-align: left;"> <span style="font-size: small;">What you call hung could be normal unless not intended:</span></h3> <span style="background-color: white; color: #404040; font-family: Lato, proxima-nova, 'Helvetica Neue', Arial, sans-serif; line-height: 24px;">from <a href="http://docs.ansible.com/playbooks_async.html" target="_blank">Ansible playbooks async</a>&nbsp;</span><span style="color: #404040; font-family: Lato, proxima-nova, Helvetica Neue, Arial, sans-serif;"><span style="line-height: 24px;">:</span></span><br /> <span style="color: #404040; font-family: Lato, proxima-nova, Helvetica Neue, Arial, sans-serif;"><span style="line-height: 24px;"><br /></span></span> <span style="background-color: #f3f3f3; color: #404040; font-family: Lato, proxima-nova, 'Helvetica Neue', Arial, sans-serif; line-height: 24px;">By default tasks in play-books block, meaning the connections stay open until the task is done on each node. This may not always be desirable, or you may be running operations that take longer than the SSH timeout.</span><br /> <h4 style="text-align: left;"> Is it the remote executed task ?</h4> <div style="text-align: left;"> </div> <ul style="text-align: left;"> <li>&nbsp;<span style="background-color: white; color: #222222; font-family: arial, sans-serif;">Run ansible-playbook with ANSIBLE_KEEP_REMOTE_FILES=1</span></li> </ul> <ul style="text-align: left;"> <li>create a python tracefile</li> </ul> <br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><b>$ python -m trace --trace&nbsp;</b></span><br /> <span style="background-color: white;"><span style="font-size: x-small;"><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">/home/jtanner/.ansible/tmp/</span><wbr style="color: #222222; font-family: Arial, Helvetica, sans-serif;"></wbr><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">ansible-1387469069.32-</span><wbr style="color: #222222; font-family: Arial, Helvetica, sans-serif;"></wbr><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">4132751518012/command&nbsp;</span></span></span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">2&gt;&amp;1 | head&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">&nbsp; --- modulename: command, funcname: &lt;module&gt;&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">command(21): import sys&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">command(22): import datetime&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">command(23): import traceback&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">command(24): import re&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">command(25): import shlex&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">&nbsp; --- modulename: shlex, funcname: &lt;module&gt;&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">shlex.py(2): """A lexical analyzer class for simple shell-like syntaxes."""&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">shlex.py(10): import os.path&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;">shlex.py(11): import sys&nbsp;</span><br /> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span> <span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span> <br /> <h3 style="text-align: left;"> <span style="background-color: white;"><span style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;">Possible causes of hangs :</span></span></h3> <div style="text-align: left;"> </div> <ul style="text-align: left;"> <li><span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;">stale shared file system in the remote&nbsp;targeted</span><span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;">&nbsp;node</span></li> <li><span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;">if it is a yum related task, and another yum process is&nbsp;running&nbsp;already in&nbsp;targeted</span><span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;">&nbsp;node</span></li> <li><span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;">Module dependency such as requirement to add the host in advance to known_hosts or forwarding SSH credentials.</span></li> <li>some issues with sudo,&nbsp;<span style="background-color: white; color: #222222; font-family: arial, sans-serif;">where the ssh user and the sudo user are the same but sudo_user is not specified.</span></li> <li><span style="background-color: white; color: #222222; font-family: arial, sans-serif;">some command module tasks are expecting input from stdin</span></li> <li><span style="background-color: white; color: #222222; font-family: arial, sans-serif;">setup module could hang due to hardware or os related issue, updated firmware, drivers could help</span></li> <li><span style="background-color: white; color: #222222; font-family: arial, sans-serif;">network, or firewall related, or change of network/firewall/load balancing caused by Ansible run</span></li> <li><span style="background-color: white; color: #222222; font-family: arial, sans-serif;">could it be a lookup issue (e.g DNS, &nbsp;or user look up)</span></li> </ul> <span style="color: #222222; font-family: arial, sans-serif;"><br /></span> <br /> <div style="text-align: left;"> <span style="font-family: arial, sans-serif;">* Thanks to Michael Dehaan and Ansible developers for a an awesome code, &nbsp;and thanks to&nbsp;</span>James Tanner&nbsp;for his help and pointers in the Ansible users mailing list, and IRC.<br /> <br /> * This was written at the time of Ansible 1.4.2 in RHEL/CENTOS based environment, &nbsp;ssh connections could even be further improved by&nbsp;<span style="background-color: white; color: #353a3d; font-family: 'Helvetica Neue', Helvetica, Helvetica, Arial, sans-serif; line-height: 17.81818199157715px;">enabling ControlPersist nor pipelining mode&nbsp;</span></div> <div style="text-align: left;"> <br /></div> </div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]0tag:blogger.com,1999:blog-8075034408193170540.post-86505412498767662852014-01-30T11:52:00.000-08:002014-02-01T01:32:02.382-08:00<div dir="ltr" style="text-align: left;" trbidi="on"> <h2 style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"> DFIR Dec. 2013 Memory Forensics Challenge notes :</span></h2> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">This is my first memory forensics outside of <a href="http://www.sans.org/" target="_blank">SANS </a>508 <a href="http://digital-forensics.sans.org/community/downloads" target="_blank">SIFT workstation</a>&nbsp;investigating&nbsp;<span style="font-style: inherit; font-variant: inherit; line-height: inherit;"><a href="https://www.linkedin.com/pub/timothy-dungan/3a/153/678" target="_blank">Timothy Dungan</a></span></span><br /> <span style="font-family: Verdana, sans-serif;">workstation "Stark Research Labs Intrusion case by Hydra" . So even though I believe that I have answered the questions that were asked in the SANS <a href="https://www.surveymonkey.com/s/JQ9QFHP" target="_blank">DFIR blog</a> , there are lots still to learn and more skills to sharpen.&nbsp; Using lots of&nbsp; curiosity, <a href="https://code.google.com/p/volatility/" target="_blank">volatility</a>, <a href="http://www.mandiant.com/resources/download/redline" target="_blank">redline</a>, and SIFT workstation it is easy to run a memory investigation especially if one is quipped by <a href="https://www.sans.org/course/advanced-computer-forensic-analysis-incident-response" target="_blank">SANS508</a> course material and volatility IRC channel.&nbsp; Below are my scattered notes from three separate sessions, the overall time it took is over 7-8 hours, it could have been done in one session with more focus and less distraction form the kids.</span><br /> <span style="font-family: Verdana, sans-serif;"><br /> <span style="font-size: x-small;">[ note to oneself : collect reports and screenshots more next time, and write report as you go along ]</span></span></div> <h3 style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Using Mandiant Redline:</span></h3> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Used Redline white listing to filter out a large amount of data that is not likely to be interesting:&nbsp;data that corresponds to unaltered, known-good software components, however, I was not successful at finding red flags "rouge processes"&nbsp;straight&nbsp;away, There were &nbsp;three&nbsp;suspicious processes i was&nbsp;targeting , &nbsp;however could not find the obvious anomaly malware introduced to systems, &nbsp;so started looking for other low hanging fruits/signals that could give me a good pivot&nbsp;point to start using also the low frequency of occurrence technique and focusing on the DFIR challenge questions asked to keep me focused.</span></div> <div class="MsoListParagraphCxSpFirst" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoListParagraphCxSpLast" style="text-align: left; text-indent: -18pt;"> <!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;">·&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <!--[endif]--><span dir="LTR"></span>Suspicious untrusted&nbsp; handle pork_bun associated with the explorer.exe process (pid:1672)<o:p></o:p></span></div> <div class="MsoListParagraphCxSpLast" style="text-align: left; text-indent: -18pt;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="Picture_x0020_10" o:spid="_x0000_i1040" type="#_x0000_t75" style='width:468pt;height:133.8pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Walid\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div> <div class="MsoListParagraph" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiprK4YivbkzO019Eb5WkYSMuoKfYVMh4T7DNeTJgcMCEEwJBsOJ35miXe7f7RxfV6T2KJvunnedRB_tdOL4mlCWnjOr2E-IvrMWvMUoIs2puXK1ZHExOUh0vhwGCljIAfpgR6hq0uy_go/s1600/pork_bun_redline.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiprK4YivbkzO019Eb5WkYSMuoKfYVMh4T7DNeTJgcMCEEwJBsOJ35miXe7f7RxfV6T2KJvunnedRB_tdOL4mlCWnjOr2E-IvrMWvMUoIs2puXK1ZHExOUh0vhwGCljIAfpgR6hq0uy_go/s1600/pork_bun_redline.PNG" height="91" width="320" /></span></a></div> <div class="MsoListParagraph" style="text-align: left;"> <o:p><span style="font-family: Verdana, sans-serif;"><br /></span></o:p></div> <div class="MsoListParagraph" style="text-align: left;"> <o:p><span style="font-family: Verdana, sans-serif;"><br /></span></o:p></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">&nbsp;Possible Gobal root kit cloaking activity via &nbsp;System &nbsp;Service Descriptor hook:<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">&nbsp;The hooking module name looks suspicious irykmmww.sys hooked to ntoskrnl.exe with <span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;">NtEnumerateKey&nbsp; </span>, and <span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;">NtEnumerateValueKey</span><span class="apple-converted-space"><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;">&nbsp;</span></span>, as well as NtQueryDirectoryFile which are used to hide things:<o:p></o:p></span></div> <div class="MsoListParagraphCxSpFirst" style="margin-left: 72pt; text-align: left; text-indent: -18pt;"> <!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span class="apple-converted-space">o&nbsp;&nbsp; </span><!--[endif]--><span dir="LTR"></span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;">NtEnumerateValueKey</span><span class="apple-converted-space"><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;">&nbsp;:</span></span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;"> : Allows an application to identify and interact with registry values. </span><span class="apple-converted-space"><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;">&nbsp; Malware use this insert itself between any registry value request and filter out what value it wants to hide.</span><o:p></o:p></span></span></div> <div class="MsoListParagraphCxSpMiddle" style="margin-left: 72pt; text-align: left; text-indent: -18pt;"> <!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span class="apple-converted-space">o&nbsp;&nbsp; </span><!--[endif]--><span dir="LTR"></span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;">NtEnumerateKey&nbsp; : Allows an application to identify and interact with registry Keys. </span><span class="apple-converted-space"><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; color: #333333;">&nbsp; Malware use this insert itself between any registry key request and filter out any registry keys it may want to hide its value.</span><o:p></o:p></span></span></div> <div class="MsoListParagraphCxSpMiddle" style="margin-left: 72pt; text-align: left; text-indent: -18pt;"> <!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;">o&nbsp;&nbsp; <!--[endif]--><span dir="LTR"></span>NtQueryDirectoryFile : Gives the application the ability to perform a directory listing. By hooking this function a malware can hide directories or files from normal file managers as well as anti-malware tools <o:p></o:p></span></div> <div class="MsoListParagraphCxSpLast" style="margin-left: 72pt; text-align: left; text-indent: -18pt;"> <!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;">o&nbsp;&nbsp; <!--[endif]--><span dir="LTR"></span>NtDeviceIoControlFile, the API Windows uses to do network related stuff and has been widely mentioned in malware behavior analysis papers. Malware can use it to replay network traffic, how cool is that?!<o:p></o:p></span></div> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjjuP_BCf5PwbgWtQM8bueQ2twxIjl0Np9JEzeyyGZwvqcoBeou2ceoUKwFNw8HIwjsrvRtmdfZJhaxdBK_m5-Q5ayYXuEV3sgHvePc9IbVSK47LUxpxaYuOtau72wuWhXZjFy3pYnIF4/s1600/redline-ssdt-hooks.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjjuP_BCf5PwbgWtQM8bueQ2twxIjl0Np9JEzeyyGZwvqcoBeou2ceoUKwFNw8HIwjsrvRtmdfZJhaxdBK_m5-Q5ayYXuEV3sgHvePc9IbVSK47LUxpxaYuOtau72wuWhXZjFy3pYnIF4/s1600/redline-ssdt-hooks.PNG" height="171" width="320" /></span></a></div> <div class="MsoListParagraphCxSpLast" style="margin-left: 72pt; text-align: left; text-indent: -18pt;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <!--[if gte vml 1]><v:shape id="Picture_x0020_9" o:spid="_x0000_i1039" type="#_x0000_t75" style='width:468pt; height:251.4pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Walid\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Not to mention my company campus ISP blocks me from doing some more research ;-)<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl75047fdY97fHJV-RCa1Ppf2eSXjes8vuBLfNMW8l_7peymg-qF485pP5zdkZge2rM3N_4IVpOse1cdXs7S_OZkCpRWz_qt0KvMERkq6qnXQH8iDmZWl5PZpM0X_utNpf-j5CYmEy0lw/s1600/websiteblocked.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl75047fdY97fHJV-RCa1Ppf2eSXjes8vuBLfNMW8l_7peymg-qF485pP5zdkZge2rM3N_4IVpOse1cdXs7S_OZkCpRWz_qt0KvMERkq6qnXQH8iDmZWl5PZpM0X_utNpf-j5CYmEy0lw/s1600/websiteblocked.png" height="97" width="320" /></span></a></div> <span style="font-family: Verdana, sans-serif;"><br /></span> <br /> <div class="MsoNormal" style="text-align: left;"> <!--[if gte vml 1]><v:shape id="Picture_x0020_24" o:spid="_x0000_i1038" type="#_x0000_t75" style='width:468pt; height:142.8pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Walid\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Not that it cannot be overridden with any vpn connection.<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Tried to acquire the driver for further analysis, however Redline couldn’t dump it, you will see later i was able to dump it with volatility which proves why you need to know more than one tool, as most&nbsp;likely one tool will not be fit for all situations and always tools will fail you most when you need them.&nbsp;</span></div> <h3 style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Using Volatility to cross check and dig deeper:</span></h3> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Treating it as a real case, preserving the initial image as read only image and its hash value:<o:p></o:p></span><br /> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="background-color: #f3f3f3;"> &nbsp;</span></span><span style="background-color: #f3f3f3; font-family: Courier New, Courier, monospace;">$ sudo chattr +i dfir-challenge/APT.img</span><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">To start processing we need to know more about the image file profile, so we run imaginfo</span></div> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNfT2w7x6PYaA9Z7dKnkmfH2WF9VXOTRZ87BDJ0kCSdPHUxV1-fn3wjIWvAO9AkyMFR4kue6FYjtxFBAJ46_X1lksBgn2BaVylWjyep9bYFKzPmOjISPLc_O8QowVcYWEXb4PWnmpyA4Q/s1600/imageinfo.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNfT2w7x6PYaA9Z7dKnkmfH2WF9VXOTRZ87BDJ0kCSdPHUxV1-fn3wjIWvAO9AkyMFR4kue6FYjtxFBAJ46_X1lksBgn2BaVylWjyep9bYFKzPmOjISPLc_O8QowVcYWEXb4PWnmpyA4Q/s1600/imageinfo.PNG" height="164" width="320" /></span></a></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">sansforensics@SIFT-Workstation:/cases/dfir-challenge$ vol32.py -f ./APT.img imageinfo<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Volatile Systems Volatility Framework 2.1_alpha<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Determining profile based on KDBG search...<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">Suggested Profile(s) : WinXPSP3x86, WinXPSP2x86<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">AS Layer1 : JKIA32PagedMemoryPae (Kernel AS)<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">AS Layer2 : FileAddressSpace (/cases/dfir-challenge/APT.img)<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">PAE type : PAE<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">DTB : 0x319000<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">KDBG : 0x80545b60L<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">KPCR : 0xffdff000L<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">KUSER_SHARED_DATA : 0xffdf0000L<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">Image date and time : 2009-05-05 19:28:57 <o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">Image local date and time : 2009-05-05 19:28:57 <o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">Number of Processors : 1<o:p></o:p></span></div> <div class="MsoNormal" style="margin-left: 18pt; text-align: left;"> <span style="font-family: Verdana, sans-serif;">Image Type : Service Pack 3<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <div class="separator" style="clear: both; text-align: center;"> </div> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="background-color: yellow; font-family: Verdana, sans-serif;">PROFILE : <span style="color: red;">WinXPSP3x86</span><o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">The normal process scan for the processes that are not supposedly hidden by unlinking the double linked list process structure. <o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-WtXxcshzAFPmtN2JLp7jWk3oJJnoPFrFvwnwV0q8vbyGZvin44pA-J48aX1dh2En3SeoQhyphenhyphenfhccWg-UhpRKx33AxD3x-YCrZFVYBYKmokdnR5gdydR3SIOr1Q5lWxCEKFpuKD1-X7IA/s1600/psscan.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-WtXxcshzAFPmtN2JLp7jWk3oJJnoPFrFvwnwV0q8vbyGZvin44pA-J48aX1dh2En3SeoQhyphenhyphenfhccWg-UhpRKx33AxD3x-YCrZFVYBYKmokdnR5gdydR3SIOr1Q5lWxCEKFpuKD1-X7IA/s1600/psscan.PNG" height="262" width="320" /></span></a></div> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <!--[if gte vml 1]><v:shape id="Picture_x0020_4" o:spid="_x0000_i1035" type="#_x0000_t75" style='width:468pt; height:384.6pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Walid\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span> <span style="font-family: Verdana, sans-serif;">Cross examining the processes seen normally via the doubly linked list vs. the ones scrapped from memory structures:</span></div> <div class="MsoNormal" style="text-align: left;"> <div class="separator" style="clear: both; text-align: center;"> <a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=8075034408193170540" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwz7T7jKXNJvygglyrxCPKOig67uJqEB-RL7ud0Oa64A8LQ9kfRTceaWz5OZxxkGLzTKceVHxKJ0wFXm9Gyfs-rUBAOa3tAk1EbNG5g9j5KNJFG5bBKm9eNu2zWTLs436YXkE_pla_zJY/s1600/psxview.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwz7T7jKXNJvygglyrxCPKOig67uJqEB-RL7ud0Oa64A8LQ9kfRTceaWz5OZxxkGLzTKceVHxKJ0wFXm9Gyfs-rUBAOa3tAk1EbNG5g9j5KNJFG5bBKm9eNu2zWTLs436YXkE_pla_zJY/s1600/psxview.PNG" height="150" width="320" /></span></a></div> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <!--[if gte vml 1]><v:shape id="Picture_x0020_7" o:spid="_x0000_i1034" type="#_x0000_t75" style='width:468pt; height:219.6pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Walid\AppData\Local\Temp\msohtmlclip1\01\clip_image013.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <div style="text-align: left;"> <div style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Scanning for network&nbsp;artifacts, since this is assumed to be an APT "advanced&nbsp;persistent&nbsp;threat" case, one good lead would if the box was infected at some time malware will have to connect with&nbsp;<span style="background-color: white; color: #444444; line-height: 16.1200008392334px;">Covert Command-and-control (</span><span style="background-color: white; color: #444444; line-height: 16.1200008392334px;">C2</span><span style="background-color: white; color: #444444; line-height: 16.1200008392334px;">)&nbsp;</span><span style="background-color: white; color: #444444; line-height: 16.1200008392334px;">channels</span>, or if this was not the one with the&nbsp;originally&nbsp; infected malware, data&nbsp;exfiltration&nbsp;activity should leave some bread crumbs for us to trace.</span></div> </div> <span style="font-family: Verdana, sans-serif;"><br /> </span><br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieF4TAfFC9TriQyY8FthviLkWcjJEiXDiAhwfKiLmxWXQ_CjTJWCEKGPNg0hSfDuQ3Iss5TUgFv5NmeTRtYeqVhu8WKCIMhlB4nEqJd7qrRdpN8Th4Dp-ZXvNhOCgDHuiNM-VEIvxC8Kg/s1600/connscan-connections.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieF4TAfFC9TriQyY8FthviLkWcjJEiXDiAhwfKiLmxWXQ_CjTJWCEKGPNg0hSfDuQ3Iss5TUgFv5NmeTRtYeqVhu8WKCIMhlB4nEqJd7qrRdpN8Th4Dp-ZXvNhOCgDHuiNM-VEIvxC8Kg/s1600/connscan-connections.PNG" height="107" width="320" /></span></a></div> <span style="font-family: Verdana, sans-serif;"><br /> &nbsp;&nbsp;interestingly enough from the connection scan above we see port 443 which is usually firewall friendly port appears to be either inactive or stealth.&nbsp; However it is from the same process to the same IP, the process is <span style="color: red;"><b>explorer.exe (1672)</b></span>. trying to find where is that ip using&nbsp;whois for the ip <b><span style="color: red;">222.128.1.2</span></b>, as seen below we find out that the ip belongs to our friends in China state owned ISP in Beijing</span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9WgDrCaKCCQQMWZ2av3rd8bOP01oxCmPdgLYLu-O8YVL_hXCz-zn13qNllMy4uRXJJN2b015fH36p-2Rc9aQj6VI9IIxco6VZ4_l4LTEiM74F3dnnG3z1SeLMEZfvZY1_k5jqBlvofq4/s1600/China-ISP-Beijing.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9WgDrCaKCCQQMWZ2av3rd8bOP01oxCmPdgLYLu-O8YVL_hXCz-zn13qNllMy4uRXJJN2b015fH36p-2Rc9aQj6VI9IIxco6VZ4_l4LTEiM74F3dnnG3z1SeLMEZfvZY1_k5jqBlvofq4/s1600/China-ISP-Beijing.png" height="320" width="254" /></span></a></div> </div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Usually malware will set a mutant so that it does not cause issues again to the system or itself by trying to install or over configure itself, &nbsp;that is done by checking if a certain mutant exists. one interesting mutant I have seen In both redline and volatility was: The <b><span style="color: red;">pork_bun</span></b> mutant<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9U8PKubcwi1lCOlbJSJ6K_jUeOQg798eNX0xIQNAEP9t4m_sJr2TRpz_POGDrGO1ZLk2wfw2wGeFa578YqCVZSwOveS0Lu38OudZdOn1MsetaNrgoDe1q7qzynVQjRfFtyrFPVEo83LI/s1600/pork_bun_vol.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9U8PKubcwi1lCOlbJSJ6K_jUeOQg798eNX0xIQNAEP9t4m_sJr2TRpz_POGDrGO1ZLk2wfw2wGeFa578YqCVZSwOveS0Lu38OudZdOn1MsetaNrgoDe1q7qzynVQjRfFtyrFPVEo83LI/s1600/pork_bun_vol.PNG" height="99" width="320" /></span></a></div> </div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Now that I am quite confident that expolere.exe pid:1672 is the rouge process. Finding which process file have the malware &nbsp;in case it was injected or hollowed is quite tedious task, however double cheking least frequent strange named unsigned handles starting with the executable DLLs , as well as SDT hooks,</span><br /> <span style="font-family: Verdana, sans-serif;"><br /> </span><br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmT2mKE1pv4NwLJTyNGts0sldQuN28eFJFZ37oqz-8d9yIFj2oXg4Ozw518IXPDURQlxgyU46YAPPZipBCzv0-nTF5cDk5nrau6-5ZRB1B6_FGHkaCEcG9EK1rbjrsMaPO1W7k35XwSHg/s1600/dll-vol.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmT2mKE1pv4NwLJTyNGts0sldQuN28eFJFZ37oqz-8d9yIFj2oXg4Ozw518IXPDURQlxgyU46YAPPZipBCzv0-nTF5cDk5nrau6-5ZRB1B6_FGHkaCEcG9EK1rbjrsMaPO1W7k35XwSHg/s1600/dll-vol.png" height="87" width="320" /></span></a></div> <span style="font-family: Verdana, sans-serif;"><br /> <br /> both&nbsp;dll search, and &nbsp;ssdt hooks via volatility arrived at the same conclusion as Redline, and this time I was able to dump the driver irykmmww.sys and confirmed its rouge using virustotal</span><br /> <span style="font-family: Verdana, sans-serif;"><br /></span> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAq3l8j2GnJgmU-zX4r-oVCT37_QOLZb0Fzk3zic8BlZDrcE4KQiGlATuNjkXoz3Z6hOPYwg6SrBMP8qzpCr0Ib05VK3sMfmbehyR0SVh9w8rweNp2jwBOdksogLADhFBiuS41HPhYxmI/s1600/virustotal-01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAq3l8j2GnJgmU-zX4r-oVCT37_QOLZb0Fzk3zic8BlZDrcE4KQiGlATuNjkXoz3Z6hOPYwg6SrBMP8qzpCr0Ib05VK3sMfmbehyR0SVh9w8rweNp2jwBOdksogLADhFBiuS41HPhYxmI/s1600/virustotal-01.png" height="144" width="320" /></span></a></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Most of the virustotal findings point to a generic trojan/backdoor root kit installed using an exploit not spread like a virus, via social engineering, probably phishing as is the norm with APT, however i am not able to tell with the&nbsp;existing&nbsp;research so far.<o:p></o:p></span><br /> <span style="font-family: Verdana, sans-serif;"><br /></span> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_gvJTlUxaU16fWMMZfSILCIhVQ2qaUjmIZWHdp-kGmuNsEGbacIKSU_UeEq7UFGfty5-Id7luw3vQZp9t07BES4v385HWBTDMV1wU7STHwpFnE9XfcfRpgP4FwQcFimXI-cA-0oFkwNI/s1600/virustotal02.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_gvJTlUxaU16fWMMZfSILCIhVQ2qaUjmIZWHdp-kGmuNsEGbacIKSU_UeEq7UFGfty5-Id7luw3vQZp9t07BES4v385HWBTDMV1wU7STHwpFnE9XfcfRpgP4FwQcFimXI-cA-0oFkwNI/s1600/virustotal02.PNG" height="154" width="320" /></span></a></div> <span style="font-family: Verdana, sans-serif;"><br /></span> <span style="font-family: Verdana, sans-serif;"><br /></span></div> <div class="MsoNormal" style="text-align: left;"> <div style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">virustotall also confirmed that an alternative of&nbsp;<span style="background-color: white; color: #464646; line-height: 17.15999984741211px;">the notorious Poison Ivy Trojan was used, which famously was used to&nbsp;</span>attack<a href="http://www.cso.com.au/article/524395/poison_ivy_used_rsa_securid_attack_still_popular/" target="_blank"> RSA's SecurID infrastructure in 2011</a><span style="background-color: white; color: #464646; line-height: 17.15999984741211px;">, going strong after eight years and is being used in targeted attacks.</span></span></div> <span style="background-color: white; color: #464646; font-size: 13px; line-height: 17.15999984741211px;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;">Other findings that the malware logs its findings or activity to :</span><br /> <span style="font-family: Verdana, sans-serif;"><br /></span> <span style="font-family: Verdana, sans-serif;">C:\DOCUME~1\demo\LOCALS~1\Temp\irykmmww.log<o:p></o:p></span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /> So doing filescan and saving it to file for further analysis I can see a suspicious other files explorer file or two, for example&nbsp;</span><br /> <span style="font-family: Verdana, sans-serif;"><br /></span> <span style="font-family: Verdana, sans-serif;">'\\WINDOWS\\system32\\exploder.exe' does not make sense to be running under system32?!</span></div> <div class="MsoNormal" style="text-align: left;"> <span style="font-family: Verdana, sans-serif;"><br /></span> <br /> <div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFfqhSq7c7HE6thumEX5SnCPVinYlNiTysRM_H7qoCfu7zppFtgsmJI1s4I5Ez1R8-JE6dR8SGH-uDBnp1b9TDDqRXJlCqzApp8VEw9kR1MBuLTbFunZ-DX4dp5BvAD9gDPZod5ZKIAnE/s1600/filescan.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFfqhSq7c7HE6thumEX5SnCPVinYlNiTysRM_H7qoCfu7zppFtgsmJI1s4I5Ez1R8-JE6dR8SGH-uDBnp1b9TDDqRXJlCqzApp8VEw9kR1MBuLTbFunZ-DX4dp5BvAD9gDPZod5ZKIAnE/s1600/filescan.png" height="84" width="320" /></span></a></div> <span style="font-family: Verdana, sans-serif;"><br /></span> <span style="font-family: Verdana, sans-serif;">and with that i have the 5 DFIR questions answered almost, the process was 1672 explorer.exe, thirykmmww.sys is what is hiding the malware artifacts from the system, and persistence &nbsp;most likely&nbsp;achieved with <a href="http://en.wikipedia.org/wiki/DLL_injection" target="_blank">dll injection</a>&nbsp;&nbsp;via the irykmmww.dll.</span><br /> <span style="font-family: Verdana, sans-serif;"><br /></span> <span style="font-family: Verdana, sans-serif;">there is more for me to follow up, and research, and more notes that I should have collected real time and post. hopefully next investigation would prove more conclusive and complete, and I would be then more familiar with windows internals.</span><br /> <span style="font-size: x-small;"><br /></span> <span style="font-size: x-small;">final note: SANS recommends highly that "Intrusion/Incident &nbsp;reports" not &nbsp;to state personal opinions and present facts only, however for my learning process I have put some of my opinions, and hopefully will validate them soon if SANS DFIR publish their &nbsp;solution. </span>&nbsp;</div> <div style="text-align: left;"> </div> <div class="MsoNormal" style="text-align: left;"> <!--[if gte vml 1]><v:shape id="Picture_x0020_23" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:468pt; height:124.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Walid\AppData\Local\Temp\msohtmlclip1\01\clip_image031.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><span style="font-family: inherit;"></span><!--[endif]--><o:p></o:p></div> </div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]2tag:blogger.com,1999:blog-8075034408193170540.post-82501150329025225702013-12-07T06:46:00.000-08:002014-01-30T11:56:17.827-08:00<div dir="ltr" style="text-align: left;" trbidi="on"> <h2 style="text-align: left;"> <u><b>Dynamic Test/Evaluation Environment&nbsp;</b></u></h2> <div style="text-align: left;"> &nbsp;<a href="http://vagrantup.com/" target="_blank">Vagrant</a>, <a href="http://code.google.com/p/ganeti/" target="_blank">Ganeti</a>&nbsp;, <a href="http://www.openstack.org/" target="_blank">Openstack</a> are great tools for a&nbsp;dynamic data-driven test&nbsp;environment. couple them with a configuration management <a href="http://cfengine.com/" target="_blank">CFEngine3</a>, <a href="http://www.opscode.com/chef/" target="_blank">Chef</a>, <a href="http://puppetlabs.com/" target="_blank">puppet</a>, ,&nbsp;<a href="http://ansible.cc/" target="_blank">Ansible</a>, or <a href="http://saltstack.org/" target="_blank">Saltstack </a>and you will start having more time on your hand, and appreciating life around you. The possibilities are endless if you are looking for a backend highly available infrastructure Ganeti is your solution, used already by <a href="http://wiki.osuosl.org/public/ganeti/osl_infrastructure" target="_blank">"Open Source Labs"</a>, <a href="http://vimeo.com/12849320" target="_blank">Google</a>, Mozilla,&nbsp;<a href="http://grnet.gr/" target="_blank"><span style="color: #1d9cd0; font-family: Arial, sans-serif;"><span style="background-color: white; font-size: 12px; line-height: 18px;">Greek Research and Technology Network</span></span><span style="background-color: white; font-family: Arial, sans-serif; font-size: 12px; line-height: 18px;">,</span></a>&nbsp;among others to manage cluster of virtual environments with resilience in mind. if you are looking for&nbsp;flexibility&nbsp;and providing your users with a private cloud solution Openstack will do. for testing new administration tools, policies, cookbooks, manifests, play books and blue prints than Vagrant is the way to go add the combination of these three together and you have dynamic solutions that scale in your own laptop or workstation from few virtual nodes to Amazon EC2, or your own company private cluster environment.&nbsp;</div> </div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]0tag:blogger.com,1999:blog-8075034408193170540.post-61806735276122140832013-12-07T06:40:00.001-08:002016-12-09T07:25:00.177-08:00Devops afternoon in Khobar- Saudi Arabia<div dir="ltr" style="text-align: left;" trbidi="on"> <h2 style="text-align: left;"> <br /></h2> <div style="text-align: left;"> Devops, and web operations did not pick up in the middle-east as it did in US, Europe, China, and India. We had a chance to present at the HPC Saudi 2013 user group conference that was coordinated by our technology planning engineer Khalid Chatilla, and Intel/IDC. we decided to check with CFEngine, PuppetLabs, Ansibleworks, and Opscode if they can participate, and they showed interest even though it is already end of year, and budgets already consumed, not to mention the short notice , logistics and planning that needs to take in action to secure their coming to Saudi Arabia. at the end Ansibleworks, and Puppetlabs managed to come and delivered an awesome afternoon, my colleague and friend Ahmed bu Khamessin with his limited graphical resources was able to capture some of these moments by his video camera and even though the sound quality is not great, he made it public to the world. &nbsp;you can see my intro slides, and Ahmed videos below<br /> <br /> <a href="http://prezi.com/uryltgdqdy-w/saudi-devops-2013-afternoon-intro" target="_blank">Prezi Introduction to Saudi Devops Days&nbsp;</a>&nbsp;with use cases from CFEngine, and Chef.<br /> <br /> <iframe allowfullscreen="" frameborder="0" height="400" id="iframe_container" mozallowfullscreen="" src="https://prezi.com/embed/uryltgdqdy-w/?bgcolor=ffffff&amp;lock_to_path=0&amp;autoplay=0&amp;autohide_ctrls=0&amp;landing_data=bHVZZmNaNDBIWnNjdEVENDRhZDFNZGNIUE12a0ltUXdSUW9PdmlLM3ZlTmticTA0bXdsUmJQNzZBVkFhMEFzZ1Nraz0&amp;landing_sign=h-zWCjvNuj30IFuwQq-85sDlj67vaA4Llli9WDu71J8" webkitallowfullscreen="" width="550"></iframe> <br /> <br /> Ansible presentation :</div> <br /> <iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/pyCnl9mHAFk" width="560"></iframe><br /> <br /> <a href="http://www.youtube.com/watch?v=_bh7uzQxRpk" rel="nofollow">&nbsp;Puppetlabs presentation in youtube</a><br /> <br /> <iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/_bh7uzQxRpk" width="560"></iframe> <br /> <div class="separator" style="clear: both; text-align: center;"> <br /></div> </div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]0tag:blogger.com,1999:blog-8075034408193170540.post-18144446798885061862013-06-19T19:12:00.000-07:002014-01-30T11:59:03.491-08:00Software packages and repositories <div dir="ltr" style="text-align: left;" trbidi="on"> Software packages and repositories is my first stop in automating the OS life cycle, the OS image including all software stacks, os, middleware, management, and application should represent a fixed state. that would difficult to track if installs were done ad-hoc outside of a&nbsp;packaging system. so for us we use&nbsp;mainly RHEL based distros. so you think the answer would be use yum, and rpms!!! well there are Java applications as jars. there are Ruby gems, there are python eggs, and there are git clones and tarballs. one answer is use fpm to convert from any format to rpm.<br /> <ul style="text-align: left;"> <li>so one challenge is the diversity of packaging types and how to&nbsp;standardise&nbsp;on one.&nbsp;&nbsp;</li> <li>Second, comes the Internet isolation and state, at work we are not allowed downloads directly from the net.&nbsp;</li> </ul> So for this second problem i need to have a way to mirror publicly accessed or Enterprise provided repos to internal repos. the easiest choice is to mirror every thing and copy it/rysnc it over to work periodically.<br /> <br /> for Ruby Gems here is the&nbsp;simplest&nbsp;way to do it :<br /> <br /> http://stackoverflow.com/questions/8411045/how-to-build-a-rubygems-mirror-server<br /> <br /> <pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;"><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">$ gem install rubygems</span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">-</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mirror</span></span></code></pre> <div style="text-align: left;"> <code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="pln" style="border: 0px; color: blue; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;"><br /></span></span></code></div> <div style="text-align: left;"> <code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="pln" style="border: 0px; color: blue; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;">Edit the YAML configuration file&nbsp;<code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 1px 5px; vertical-align: baseline;">~/.gem/.mirrorrc</code>:</span></span></code></div> <div style="text-align: left;"> <code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="pln" style="background-color: transparent; border: 0px; color: blue; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;"><br /></span></span></code></div> <pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="pln" style="background-color: transparent; border: 0px; color: blue; margin: 0px; padding: 0px; vertical-align: baseline;"><strong style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; margin: 0px; padding: 0px; vertical-align: baseline; white-space: normal;"><pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-weight: normal; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">---</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">-</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> from</span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">:</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> http</span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">://</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">rubygems</span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">org to</span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">:</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">~</span><span class="str" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">/.gem/</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mirror</span></code></pre> </strong></span></code></pre> <span style="color: blue;">the to: filed above can be better pointing to a usb storage, where ever it points at&nbsp;</span><br /> <pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;"><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">$ mkdir </span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">~</span><span class="str" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">/.gem/</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mirror</span></span></code></pre> <div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;"> <span style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;">Start mirroring:</span></span></div> <pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;">$ gem mirror</span></span></code></pre> <div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;"> <span style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;">Once mirroring finishes edit&nbsp;<code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 1px 5px; vertical-align: baseline;">~/.gem/mirror/config.ru</code>:</span></span></div> <pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;"><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">require </span><span class="str" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">"rubygems"</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> require </span><span class="str" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">"geminabox"</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="typ" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Geminabox</span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">data </span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="str" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">"./"</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> run </span><span class="typ" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Geminabox</span></span></code></pre> <div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;"> <span style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;">Install Gem in a box:</span></span></div> <pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;">$ gem install geminabox</span></span></code></pre> <div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;"> <span style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;">Start gem server:</span></span></div> <pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;"><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">$ cd </span><span class="pun" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">~</span><span class="str" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">/.gem/</span><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mirror $ rackup</span></span></code></pre> <div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;"> <span style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;">Edit your application's&nbsp;<code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 1px 5px; vertical-align: baseline;">Gemfile</code>&nbsp;to use your gem server:</span></span></div> <pre class="lang-rb prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: blue;"><span class="pln" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">source </span><span class="str" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">"http://your.servers.ip:9292"</span></span></code></pre> </div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]0tag:blogger.com,1999:blog-8075034408193170540.post-14680839626383539062013-05-21T00:57:00.000-07:002013-05-21T07:16:33.358-07:00Virtualbox guest host NATed<div dir="ltr" style="text-align: left;" trbidi="on"> <br /> After installing CentOS6.4 as guest OS in Windows 8.0 and configuring the single network interface using NAT mode, I could not from first instance ssh using putty to the guest OS DHCP ip address given as 10.0.2.15.<br /> <br /> I had to power off the Guest and enable port forwarding first as described in NATFORWARD section under NAT networking mode on chapter 6 of the users manual.<br /> <br /> <a href="https://www.virtualbox.org/manual/ch06.html#natforward">https://www.virtualbox.org/manual/ch06.html#natforward</a><br /> <br /> Below are the commands i used to configure and check port forwarding<br /> <br /> <pre style="background-color: #eeeeee; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border: none; box-sizing: border-box; color: #333333; font-family: 'PT Mono', sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 5px; margin-top: 20px; padding: 10px 15px; white-space: pre-wrap; word-break: normal; word-wrap: break-word;"><span style="background-color: white; font-family: Times, Times New Roman, serif; font-size: x-small;"> .\VBoxManage listvms</span></pre> <pre style="background-color: #eeeeee; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border: none; box-sizing: border-box; color: #333333; font-family: 'PT Mono', sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 5px; margin-top: 20px; padding: 10px 15px; white-space: pre-wrap; word-break: normal; word-wrap: break-word;"><span style="background-color: white; font-family: Times, Times New Roman, serif; font-size: x-small;"> .\VBoxManage modifyvm "CentOS01" --natpf1 "guestssh,tcp,,2222,,22"</span></pre> <pre style="background-color: #eeeeee; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border: none; box-sizing: border-box; margin-bottom: 5px; margin-top: 20px; padding: 10px 15px; word-break: normal; word-wrap: break-word;"><span style="color: #333333;"><span style="background-color: white; font-family: Times, Times New Roman, serif; font-size: x-small; line-height: 20px; white-space: pre-wrap;"> .\VBoxManage.exe showvminfo CentOS01 |findstr "2222" NIC 1 Rule(0): name = guestssh, protocol = tcp, host ip = , host port = 2222, guest ip = , guest port = 22</span></span></pre> in putty host = localhost and port will be in this case 2222 <br /> <br /> the above was done to test the ORD OpenStack Red Hat distribution, i had several failures before i was able to install it using the quickstart successfuly. first due the disk size, the disk size should be over 22 Gbyte so that Cinder can create 20Gbyte disk by default, second the selinux needs to be enabled. and every time it fails you need to remove cinder packages and logical volume manually before restarting the installation and cleaning up the bits and pieces from old installation.<br /> <br /> a succesfful install should not take over 20-30 mins.<br /> <br /> <br /></div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]0tag:blogger.com,1999:blog-8075034408193170540.post-13024369742984979252013-01-28T12:58:00.002-08:002016-12-09T23:55:22.962-08:00How many administrators do you need for your operations?<div dir="ltr" style="text-align: left;" trbidi="on"> <span style="font-size: large;"><u>How many administrators do you need for your operations?</u></span><br /> <br /> <br /> <span style="font-size: small;">Several </span>online resources are discussing this issue. it usually depends on several factors such as :<br /> <br /> I- Factors that could reduce the number of admins needed:<br /> <ul> <li>Remote console/power and remote management tool availability</li> <li>Vitalisation</li> <li>Physical server, and rack technology (e.g. blades or skinless vs. U2 servers)</li> <li>Availability of management tools&nbsp; (rack management, api such as in EC2, and cloud providers)</li> <li>Platform ( e.g. Unix, and Unix like vs. Windows )</li> <li>Configuration management and automation tools.</li> <li>Initial plan, and vision of business/data centre expansion</li> <li>Organisation requirements, maturity, stability, and adoption of the devops culture.</li> </ul> II- Factors that could increase the number of admins needed<br /> <ul> <li>Size and diversity of data managed.</li> <li>Number, and diversity of servers and server configurations</li> <li>Number of users</li> <li>Number and diversity of applications used and&nbsp; supported*.&nbsp;</li> <li>Number of new technologies at the ground or acquired within&nbsp; the data centre</li> <li>Complexity of the solution and infrastructure.</li> </ul> * used by the administration&nbsp; team, and supported on behalf of&nbsp;others within or external to the organisation.<br /> <ul> </ul> So what is the best practice metric that should be used? it depends on what kind of operations the business is running and how messy, or diverse it is customer or application space, as well as management approach towards operations and support from the start. not to mention what we mean by best practise is the best try, best deployment plan, however as soon as it materialised it can be improved so it becomes good practise or&nbsp; could be even bad if it did not evolve<br /> <br /> CERN did not use&nbsp;virtualization to help deploy and run &nbsp;their HPC codes, however have chosen to adopt virtualization to ease out administration and management costs<br /> <br /> <a href="http://www.datacenterknowledge.com/archives/2009/12/30/archives/2009/10/13/facebook-now-has-30000-servers/" target="_blank">FaceBook</a>&nbsp; 230 engineers supporting data for over than more three million users, at around 130 servers per admin&nbsp; [1]<br /> <br /> Microsoft <b>automated </b>data center operations at around 1000-2000 servers per admin, while its <a href="http://www.datacenterknowledge.com/archives/2009/12/30/inside-microsofts-chicago-data-center/" target="_blank">new container data center</a> will be around 10,000 server/DC employee.<br /> <br /> IDC reports in large dominant&nbsp; providers such as Google, it could be 10,000 servers/admin while in small to medium businesses it could be 30:1 for physical boxes and 80:1 for virtual machines. [2]<br /> <br /> Gartner analyst, Errol Rasit says “We have observed that it can be, for example with a physical server, as low as 10 per admin, and for virtual servers as many as 500,”<br /> <br /> <br /> resources :<br /> <br /> <a href="http://www.datacenterknowledge.com/archives/2009/12/30/how-many-servers-can-one-admin-manage/" target="_blank">[1] Data Center Knowledge Article "how many servers can one admin-manage"</a><br /> <br /> <a href="http://www.computerworld.com.au/article/352635/there_best_practice_server_system_administrator_ratio_/" target="_blank">[2] Computer World Australia IDC reference&nbsp; </a><br /> <br /> <br /> <br /></div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]0tag:blogger.com,1999:blog-8075034408193170540.post-64390482058402570062013-01-23T23:13:00.000-08:002016-12-09T07:25:51.495-08:00CFEngine3 by examples<div dir="ltr" style="text-align: left;" trbidi="on"> <u><b>CFEngine3 by examples :</b></u> CFEngine3 3.4.x is the latest community release from CFEngine, one of the new features that was missing is the publicly available reusable easy to do/read policies. in the terminology of CFEngine i believe it is called sketches,&nbsp; they are another form of describing your system desired end state using promises, however in this case you are getting them, or publishing them in <a href="http://cfengine.com/cfengine-design-center" target="_blank">Design-Center</a>.&nbsp; Nick Anderson a Motorola employee and an experienced long term CFengine and advocator have released publicly an easy to develop and <a href="https://github.com/nickanderson/CFEngine-3-by-example-vagrant" target="_blank">test environment using vagrant in Github.&nbsp; </a>along with examples to get one started quickly. ignoring the download times of Vagrant, Git, and CFengine codes, the process should not take you more than 5-10 minutes. I have realized that CFEngine do not release binaries for OSX, so i used brew to get the latest CFEngine which was 3.4.1, while the latest at this time was 3.4.2. not bad! ha!. i had to download also the xcode command line tools to get make, gcc among other development tools to get things build and working.&nbsp; No excuse on getting more familiar with CFengine in no time, especially that CFEngine senior security adviser and <a href="http://shop.oreilly.com/product/0636920022022.do" target="_blank">Orielly book "Learning CFengine 3"</a> author sent me a chapter from his 3rd edition regarding vagrant and Behavioral testing for CFengine.&nbsp;</div> Walid Shaarihttp://www.blogger.com/profile/15275389583161808626[email protected]0