<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Posts on Hello fellow nerd!</title>
        <link>https://jplace.nl/posts/</link>
        <description>Recent content in Posts on Hello fellow nerd!</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <copyright>&lt;a href=&#34;https://creativecommons.org/licenses/by-nc/4.0/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;CC BY-NC 4.0&lt;/a&gt;</copyright>
        <lastBuildDate>Fri, 29 May 2026 11:16:15 +0200</lastBuildDate>
        <atom:link href="https://jplace.nl/posts/index.xml" rel="self" type="application/rss+xml" />
        
        <item>
            <title>Use Docker DIND in gitlab actions</title>
            <link>https://jplace.nl/posts/older_posts/use-docker-dind-in-gitlab-actions/</link>
            <pubDate>Fri, 29 May 2026 11:16:15 +0200</pubDate>
            
            <guid>https://jplace.nl/posts/older_posts/use-docker-dind-in-gitlab-actions/</guid>
            <description>&lt;p&gt;So this will be a short blog post just to explain a bit further on how docker DIND can work within gitlab actions.&lt;/p&gt;
&lt;h2 id=&#34;one-tiny-piece-to-get-it-to-work&#34;&gt;One tiny piece to get it to work&lt;/h2&gt;
&lt;p&gt;So if you ever tried to build your docker images with a pipeline possibly you have found some errors that it can&amp;rsquo;t connect to docker.
Well this is correct since an container normally cannot connect to it.
What can you then do to make it work?
Well actually it is pretty easy!&lt;/p&gt;</description>
            <content type="html"><![CDATA[<p>So this will be a short blog post just to explain a bit further on how docker DIND can work within gitlab actions.</p>
<h2 id="one-tiny-piece-to-get-it-to-work">One tiny piece to get it to work</h2>
<p>So if you ever tried to build your docker images with a pipeline possibly you have found some errors that it can&rsquo;t connect to docker.
Well this is correct since an container normally cannot connect to it.
What can you then do to make it work?
Well actually it is pretty easy!</p>
<p>First of all I won&rsquo;t go through installing gitlab runner or adding it to a project and so on but lets keep it simple.
There is 1 trick to make it work and that is to make sure the following is in the /etc/gitlab-runner/config.toml</p>
<pre tabindex="0"><code>volumes = [&#34;/var/run/docker.sock:/var/run/docker.sock&#34;,&#34;/cache&#34;]
</code></pre><p>That way the container can reach the docker socket.</p>
<h2 id="a-word-of-advice">A word of advice</h2>
<p>Always think about security! With this the docker container can do more then it would normally do.
Isolate the runner maybe and of course: Monitor it!</p>
<h2 id="and-that-was-all">And that was all</h2>
<p>Well it was pretty short but that was all =) took me a while to figure it out a bit but hopefully it helps somebody!</p>
]]></content>
        </item>
        
        <item>
            <title>Your own AWX EE</title>
            <link>https://jplace.nl/posts/older_posts/your-own-awx-ee/</link>
            <pubDate>Fri, 29 May 2026 11:16:15 +0200</pubDate>
            
            <guid>https://jplace.nl/posts/older_posts/your-own-awx-ee/</guid>
            <description>&lt;p&gt;So you use AWX? And the default Execution Environment is not good enough for you?&lt;br&gt;
Well Luckily you can create one for your own pretty easily!&lt;/p&gt;
&lt;h2 id=&#34;well-what-do-you-need&#34;&gt;Well what do you need?&lt;/h2&gt;
&lt;p&gt;So What is needed you ask? Well not so much actually..&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A build host or your PC or laptop.&lt;/li&gt;
&lt;li&gt;Ansible-builder installed&lt;/li&gt;
&lt;li&gt;Docker or podman installed and confgured.&lt;/li&gt;
&lt;li&gt;A place to place your image, like a registry or in oour case lets use gitlab =)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Not that long of a list I presume? If you use self hosted gitlab make sure you enable the container registry option.&lt;/p&gt;</description>
            <content type="html"><![CDATA[<p>So you use AWX? And the default Execution Environment is not good enough for you?<br>
Well Luckily you can create one for your own pretty easily!</p>
<h2 id="well-what-do-you-need">Well what do you need?</h2>
<p>So What is needed you ask? Well not so much actually..</p>
<ul>
<li>A build host or your PC or laptop.</li>
<li>Ansible-builder installed</li>
<li>Docker or podman installed and confgured.</li>
<li>A place to place your image, like a registry or in oour case lets use gitlab =)</li>
</ul>
<p>Not that long of a list I presume? If you use self hosted gitlab make sure you enable the container registry option.</p>
<h2 id="lets-start-building">Lets start building!</h2>
<p>So lets get started!<br>
First we need ansible-builder installed.. How we do that you ask?<br>
<code>pip3 install ansible-builder</code>
And that is all to get it installed..
I won&rsquo;t go through on how to install docker or podman since there are quite allot of good guides for that. But just make sure you have it up and running.</p>
<p>So lets start a simple build shall we?<br>
First lets make a new directory and create a new file called execution-environment.yml</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>mkdir eebuild
</span></span><span style="display:flex;"><span>touch eebuild/execution-environment.yml 
</span></span></code></pre></div><p>Now lets edit the yml file we just created in your favorite editor.<br>
You can copy what I stated bellow or just make it how you want, we will go through the items step by step</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">version</span>: <span style="color:#ae81ff">3</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">images</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">base_image</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">name</span>: <span style="color:#ae81ff">quay.io/centos/centos:stream9</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">dependencies</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">ansible_core</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">package_pip</span>: <span style="color:#ae81ff">ansible-core&gt;=2.15.0rc2,&lt;2.16</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">ansible_runner</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">package_pip</span>: <span style="color:#ae81ff">ansible-runner</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">galaxy</span>: |<span style="color:#e6db74">
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    ---
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    collections:
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">      - name: awx.awx
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">      - name: ansible.posix
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">      - name: ansible.windows
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">      - name: community.general</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">system</span>: |<span style="color:#e6db74">
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    git-core [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    python3.9-devel [platform:rpm compile]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    libcurl-devel [platform:rpm compile]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    krb5-devel [platform:rpm compile]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    krb5-workstation [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    subversion [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    subversion [platform:dpkg]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    git-lfs [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    sshpass [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    rsync [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    epel-release [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    python-unversioned-command [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    unzip [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    podman-remote [platform:rpm]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    cmake [platform:rpm compile]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    gcc [platform:rpm compile]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    gcc-c++ [platform:rpm compile]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    make [platform:rpm compile]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    openssl-devel [platform:rpm compile]</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">python</span>: |<span style="color:#e6db74">
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    ncclient
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    paramiko
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    pykerberos
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    pyOpenSSL
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    pypsrp[kerberos,credssp]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    pywinrm[kerberos,credssp]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    toml
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    pexpect&gt;=4.5
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    python-daemon
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    pyyaml
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    six
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    receptorctl
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    python-tss-sdk</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">additional_build_steps</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">append_base</span>:
</span></span><span style="display:flex;"><span>    - <span style="color:#ae81ff">RUN $PYCMD -m pip install -U pip</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">append_final</span>:
</span></span><span style="display:flex;"><span>    - <span style="color:#ae81ff">COPY --from=quay.io/ansible/receptor:devel /usr/bin/receptor /usr/bin/receptor</span>
</span></span><span style="display:flex;"><span>    - <span style="color:#ae81ff">RUN mkdir -p /var/run/receptor</span>
</span></span><span style="display:flex;"><span>    - <span style="color:#ae81ff">RUN git lfs install --system</span>
</span></span></code></pre></div><p>So lets go through a couple of items..<br>
First of all at the base_image you state which image you want to use, I for now use the centos stream9 image.. It isn&rsquo;t as bad as many people say, it just works.<br>
Then the next interesting part is the Galaxy part.<br>
You can do this a couple of ways, or as I have stated here in one file. Or you can create a yml file and point to that one.<br>
Same goes for system and python.
For further information please take a look at RedHats documentation: <a href="https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.3/html/creating_and_consuming_execution_environments/assembly-using-builder#con-building-definition-file">Ansible builder docs</a>.</p>
<h2 id="we-created-the-files-but-now-lets-really-start-building">We created the files, but now lets really start building!</h2>
<p>So we created the files we needed and a special directory. Awesome! we are halfway there..
Now lets start building!!
So we go to the directory and then we start the command:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>ansible-builder build -v3 -t &lt;name-for-image&gt; --container-runtime<span style="color:#f92672">=</span>docker
</span></span></code></pre></div><p>Replace the <!-- raw HTML omitted --> with a real name like: awesome-first-image.<br>
The &ndash;container-runtime=docker is only needed when you use docker for your build. When using podman you don&rsquo;t need to define it.
Now with the build command it will create the image also. With the -v3 we get allot more logging, who doesn&rsquo;t love allot of text on their screen to make them look busy?
You don&rsquo;t want to have it also build and create the image and only create the docker or podman files?</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>ansible-builder create .....  
</span></span></code></pre></div><p>This will only create a Containerfile without a image.</p>
<h2 id="now-we-created-and-build-a-image-how-do-we-use-it-and-where-to-put-it">Now we created and build a image.. How do we use it and where to put it?</h2>
<p>Well good question if I ask so my self.. You can use a registry for that. In this case we will use gitlab since I have it and I don&rsquo;t want to setup anything else for now.<br>
So lets login to gitlab and creat a repo.. Done it? Great job, I am proud of you..<br>
Now inside the repo Go to: deploy &ndash;&gt; container registry.
Follow the steps that for creating a Personal access token if needed and lets go for it.<br>
Now we have the repo ready and the image build, in this example I will use docker commands as example, podman commands can be found in their docs.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>docker login registry.gitlab.com <span style="color:#75715e"># with this we login to the docker registry.. </span>
</span></span><span style="display:flex;"><span>docker build -t registry.gitlab.com/jeffrey44113/awesomerepoforaimage . <span style="color:#75715e"># only needed if you want to build the image again, always fun to do of course but don&#39;t forget to cd into the context directory if you want to do it</span>
</span></span><span style="display:flex;"><span>docker push registry.gitlab.com/jeffrey44113/awesomerepoforaimage <span style="color:#75715e"># with this you push the created image to the registry</span>
</span></span></code></pre></div><p>If you pushed the image refresh the page in gitlab and you should see the image located there.<br>
Well done! now the image is ready to be used!</p>
<h3 id="now-what-about-the-awx-part">Now what about the AWX part?</h3>
<p>Well that is actually the easiest part.<br>
Go to AWX and login with a account hat has the rights for the administration part.
Go to: Administration &ndash;&gt; Execution Environments &ndash;&gt; Add &ndash;&gt; Fill in a good name like: The most awesome image eva. At the image part we will then place in the image name like: registry.gitlab.com/jeffrey44113/awesomerepoforaimage:latest.<br>
For the pull options and registry credentials, use it if you prefer too. For now we will use the defaults.<br>
Save it and you should have a beautiful new EE.</p>
<p>Now to use it you can define it in your job template or if you want your organisation to use that specific Execution Environment then:<br>
Go to Access &ndash;&gt; Organizations &ndash;&gt; Select the Organization you want to edit &ndash;&gt; Edit &ndash;&gt; Select the Execution enviroment we just created.</p>
<h2 id="and-thats-all-folks">And thats all folks</h2>
<p>Well that is all you need to create your own EE, it isn&rsquo;t difficult and the docs actually explains it better then I ever can do so do read it for sure!<br>
And well it has been quite some time since I last time had made a post for this site. Reasons are more personal and I was busy mostly with my self last year.<br>
I do hope to write a bit more and also more interesting subjects like Kubernetes, more AWX and also about how I am developing my own ansible modules for suse manager.
Now lets just hope everything goes as plan for once and hope this post helped a bit!<br>
See you next time.</p>
]]></content>
        </item>
        
    </channel>
</rss>
