Skip to content

Commit

Permalink
[Post] undrafted first post
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianKoshka committed Jan 25, 2019
1 parent cbd36d5 commit 809138d
Show file tree
Hide file tree
Showing 7 changed files with 600 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,24 @@ <h1 class="title is-4">Adrian&#39;s Blog</h1>
<div class="container">


<article>
<div class="subtitle tags is-6 is-pulled-right">

</div>
<h2 class="subtitle is-6">January 24, 2019</h2>
<h1 class="title"><a href="https://adriankoshka.github.io/blog/post/travis-and-quay/">Using Travis to push container images to Quay.io</a></h1>
<div class="content">
Preface This blog post assumes:
The user is familiar with: Travis-ci Docker (or podman/buildah) Git Github The user has an account with: Travis-ci Github Quay For those unfamiliar with the above, here are some resources
Introduction I prefer using Quay.io as my container registry instead of Dockerhub, and as such, I had to learn how setup Travis to push to quay.io. This is something I hadn&rsquo;t done before, as I&rsquo;ve only recently started making my own container images.

<a class="button is-link" href="https://adriankoshka.github.io/blog/post/travis-and-quay/" style="height:28px">
Read more
</a>

</div>
</article>

</div>
</section>
<section class="section">
Expand Down
153 changes: 153 additions & 0 deletions docs/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,158 @@
<atom:link href="https://adriankoshka.github.io/blog/index.xml" rel="self" type="application/rss+xml" />


<item>
<title>Using Travis to push container images to Quay.io</title>
<link>https://adriankoshka.github.io/blog/post/travis-and-quay/</link>
<pubDate>Thu, 24 Jan 2019 20:02:00 +0000</pubDate>
<author>Adrian Lucrèce Céleste</author>
<guid>https://adriankoshka.github.io/blog/post/travis-and-quay/</guid>
<description></description>

<content>

&lt;h2 id=&#34;preface&#34;&gt;Preface&lt;/h2&gt;

&lt;p&gt;This blog post assumes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user is familiar with:

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://travis-ci.org&#34;&gt;Travis-ci&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.docker.com/&#34;&gt;Docker&lt;/a&gt; (or &lt;a href=&#34;https://podman.io&#34;&gt;podman&lt;/a&gt;/&lt;a href=&#34;https://buildah.io&#34;&gt;buildah&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://git-scm.com/&#34;&gt;Git&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com&#34;&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;The user has an account with:

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://travis-ci.org&#34;&gt;Travis-ci&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com&#34;&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://quay.io&#34;&gt;Quay&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For those unfamiliar with the above, here are some &lt;a href=&#34;#resources&#34;&gt;resources&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;

&lt;p&gt;I prefer using &lt;a href=&#34;https://quay.io&#34;&gt;Quay.io&lt;/a&gt; as my container registry instead of
&lt;a href=&#34;https://hub.docker.com&#34;&gt;Dockerhub&lt;/a&gt;, and as such, I had to learn how setup
&lt;a href=&#34;https://travis-ci.org&#34;&gt;Travis&lt;/a&gt; to push to &lt;a href=&#34;https://quay.io&#34;&gt;quay.io&lt;/a&gt;. This is
something I hadn&amp;rsquo;t done before, as I&amp;rsquo;ve only recently started making my own
container images.&lt;/p&gt;

&lt;h3 id=&#34;step-one-fork-the-tutorial-repo&#34;&gt;Step One: fork the tutorial repo&lt;/h3&gt;

&lt;p&gt;I&amp;rsquo;ve setup a repo on github that I&amp;rsquo;ll be using as a guide for this tutorial, it
can be found &lt;a href=&#34;https://github.com/AdrianKoshka/travis-quay-tutorial&#34;&gt;here&lt;/a&gt;. All
you need to do is press the &lt;code&gt;Fork&lt;/code&gt; button:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/fork-button.png&#34; alt=&#34;fork button&#34; /&gt;&lt;/p&gt;

&lt;p&gt;This will make a copy of my repo for you to use with your account. The next step
is to clone this repo:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone [email protected]:AdrianKoshka/travis-quay-tutorial.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can find the URL to clone from when you press the &lt;code&gt;Clone or download&lt;/code&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/clone-button-quay-travis-tut.png&#34; alt=&#34;clone or download button&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;step-two-initial-repo-setup&#34;&gt;Step Two: Initial repo setup&lt;/h3&gt;

&lt;p&gt;You&amp;rsquo;ll need to edit the &lt;code&gt;.travis.yml&lt;/code&gt; and &lt;code&gt;docker_push&lt;/code&gt; files in your repo,
replacing &lt;code&gt;[yourusername]&lt;/code&gt; with the username of your quay account.&lt;/p&gt;

&lt;script src=&#34;https://gist.github.com/AdrianKoshka/52691ea092f24997488b0bcdefd6d0b5.js&#34;&gt;&lt;/script&gt;

&lt;script src=&#34;https://gist.github.com/AdrianKoshka/ee32d9157fd941f98c4eb60afac919ff.js&#34;&gt;&lt;/script&gt;

&lt;h3 id=&#34;step-three-creating-the-quay-repository&#34;&gt;Step Three: Creating the quay repository&lt;/h3&gt;

&lt;p&gt;When signed into quay, in the upper right-hand corner, you&amp;rsquo;ll see a
&lt;code&gt;+ Create New Repository&lt;/code&gt; button. Click the button,&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/quay-plus-button.png&#34; alt=&#34;quay plus button&#34; /&gt;&lt;/p&gt;

&lt;p&gt;You&amp;rsquo;ll want to select &lt;code&gt;Public&lt;/code&gt; instead of &lt;code&gt;Private&lt;/code&gt;, and enter the repository name.
Then click &lt;code&gt;Create Public Repository&lt;/code&gt;. You&amp;rsquo;ve now created the empty repository
we&amp;rsquo;ll be pushing our container image to later.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/quay-new-repo.png&#34; alt=&#34;quay new repo&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;step-four-creating-the-robot-account&#34;&gt;Step Four: Creating the &amp;ldquo;Robot Account&amp;rdquo;&lt;/h3&gt;

&lt;p&gt;Robot accounts are &amp;ldquo;accounts&amp;rdquo; in quay.io under your user used for automated tasks.&lt;/p&gt;

&lt;p&gt;Again, in the upper right-hand corner, you&amp;rsquo;ll see the &lt;code&gt;+&lt;/code&gt; button, click it, then
click &lt;code&gt;New Robot Account&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/new-robot-account.png&#34; alt=&#34;New Robot Account&#34; /&gt;&lt;/p&gt;

&lt;p&gt;You&amp;rsquo;ll need to enter a name and description for the bot:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/create-robot-step-one.png&#34; alt=&#34;Create Robot Account Step 1&#34; /&gt;&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;Create Robot Account&lt;/code&gt;, now you&amp;rsquo;ll have to give the robot write
permissions to the repo you just created:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/robot-give-privs.png&#34; alt=&#34;Give Robot privileges&#34; /&gt;&lt;/p&gt;

&lt;p&gt;Then press &lt;code&gt;Add Permissions&lt;/code&gt;. You&amp;rsquo;ll be taken to your robot account settings
page now.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/robot-account-settings.png&#34; alt=&#34;Robot Settings Page&#34; /&gt;&lt;/p&gt;

&lt;p&gt;Click the username of your newly created bot, it should bring up a window
with your bots username and password.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/bot-creds.png&#34; alt=&#34;Bot username and password&#34; /&gt;&lt;/p&gt;

&lt;p&gt;We&amp;rsquo;ll need these creds later.&lt;/p&gt;

&lt;h3 id=&#34;step-five-adding-variables-to-your-repo-on-travis&#34;&gt;Step Five: Adding variables to your repo on travis&lt;/h3&gt;

&lt;p&gt;On Travis, go to your settings and click the &lt;code&gt;sync account&lt;/code&gt; button. In the list
of repositories should be your &lt;code&gt;travis-quay-tutorial&lt;/code&gt; repo you forked earlier,
activate it, and click on the &lt;code&gt;settings&lt;/code&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/travis-settings.png&#34; alt=&#34;Travis Settings&#34; /&gt;&lt;/p&gt;

&lt;p&gt;Scroll down to the section named &lt;code&gt;Environment Variables&lt;/code&gt;, and add a variable
name &lt;code&gt;QUAY_BOT_USERNAME&lt;/code&gt;, put the username of your robot account that you saw
in the previous section, you should be able to copy-paste it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/travis-env-var-username.png&#34; alt=&#34;Add QUAY_BOT_USERNAME&#34; /&gt;&lt;/p&gt;

&lt;p&gt;Press the &lt;code&gt;Add&lt;/code&gt; button. Add another variable called &lt;code&gt;QUAY_BOT_PASSWORD&lt;/code&gt; and
enter your bots password.&lt;/p&gt;

&lt;p&gt;Your &lt;code&gt;Environment Variables&lt;/code&gt; section should look like this now:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://adriankoshka.github.io/blog/blog/imgs/travis-env-var-after.png&#34; alt=&#34;Travis Environmental Variables After&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;step-six-committing-the-changes-from-step-two&#34;&gt;Step Six: Committing the changes from step two&lt;/h3&gt;

&lt;p&gt;Now that you&amp;rsquo;ve set everything else up, you can commit your changes to
&lt;code&gt;.travis.yml&lt;/code&gt; and &lt;code&gt;docker_push&lt;/code&gt;, then push your changes to your fork. This
should trigger a build with travis, which will build the container, and then
push it to the quay repository.&lt;/p&gt;

&lt;h2 id=&#34;resources&#34;&gt;Resources&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.travis-ci.com/user/for-beginners&#34;&gt;Travis Core Concepts for Beginners&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.docker.com/resources/what-container&#34;&gt;Docker: What is a Container&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.docker.com/get-started&#34;&gt;Docker: Get Started with Docker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/containers/libpod/blob/master/docs/tutorials/podman_tutorial.md&#34;&gt;Podman: Basic Setup and Use of Podman&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/containers/buildah/tree/master/docs/tutorials&#34;&gt;Buildah: Tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://guides.github.com/&#34;&gt;Github Guides&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>

</item>

</channel>
</rss>
135 changes: 135 additions & 0 deletions docs/post/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>

<title>Posts | Adrian&#39;s Blog</title>



<link href="https://adriankoshka.github.io/blog/index.xml" rel="alternate" type="application/rss+xml" title="Adrian&#39;s Blog" />

<link rel="stylesheet" href="/blog/css/style.css"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<section class="section">
<div class="container">
<nav class="nav">
<div class="nav-left">
<a class="nav-item" href="https://adriankoshka.github.io/blog/">
<h1 class="title is-4">Adrian&#39;s Blog</h1>
</a>
</div>
<div class="nav-right">
<nav class="nav-item level is-mobile"><a class="level-item" aria-label="github" href='https://github.com/adriankoshka'
target='_blank' rel='noopener'>
<span class="icon">
<i class><svg viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'>

<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/>

</svg></i>
</span>
</a><a class="level-item" aria-label="twitter" href='https://twitter.com/lucrececeleste'
target='_blank' rel='noopener'>
<span class="icon">
<i class><svg viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'>

<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"/>

</svg></i>
</span>
</a><a class="level-item" aria-label="email" href='mailto:[email protected]'
target='_blank' rel='noopener'>
<span class="icon">
<i class><svg viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'>

<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>
<polyline points="22,6 12,13 2,6"/>

</svg></i>
</span>
</a><a class="level-item" aria-label="rss" href='/blog/index.xml'
target='_blank' rel='noopener'>
<span class="icon">
<i class><svg viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'>

<path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle>

</svg></i>
</span>
</a></nav>
</div>
</nav>

<nav class="nav">



</nav>

</div>
</section>
<section class="section">
<div class="container">


<article>
<div class="subtitle tags is-6 is-pulled-right">

</div>
<h2 class="subtitle is-6">January 24, 2019</h2>
<h1 class="title"><a href="https://adriankoshka.github.io/blog/post/travis-and-quay/">Using Travis to push container images to Quay.io</a></h1>
<div class="content">
Preface This blog post assumes:
The user is familiar with: Travis-ci Docker (or podman/buildah) Git Github The user has an account with: Travis-ci Github Quay For those unfamiliar with the above, here are some resources
Introduction I prefer using Quay.io as my container registry instead of Dockerhub, and as such, I had to learn how setup Travis to push to quay.io. This is something I hadn&rsquo;t done before, as I&rsquo;ve only recently started making my own container images.

<a class="button is-link" href="https://adriankoshka.github.io/blog/post/travis-and-quay/" style="height:28px">
Read more
</a>

</div>
</article>

</div>
</section>
<section class="section">
<div class="container">
<nav class="level is-mobile">
<div class="level-left">
<div class="level-item">

</div>
</div>
<div class="level-right is-marginless">
<div class="level-item">

</div>
</div>
</nav>
</div>
</section>

<section class="section">
<div class="container has-text-centered">
<p>Adrian Lucrèce Céleste 2019</p>

<p>Powered by <a href="https://gohugo.io/">Hugo</a> &amp; <a href="https://github.com/ribice/kiss">Kiss</a>.</p>

</div>
</section>



</body>
</html>


27 changes: 27 additions & 0 deletions docs/post/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Posts on Adrian&#39;s Blog</title>
<link>https://adriankoshka.github.io/blog/post/</link>
<description>Recent content in Posts on Adrian&#39;s Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>Adrian Lucrèce Céleste 2019</copyright>
<lastBuildDate>Thu, 24 Jan 2019 20:02:00 +0000</lastBuildDate>

<atom:link href="https://adriankoshka.github.io/blog/post/index.xml" rel="self" type="application/rss+xml" />


<item>
<title>Using Travis to push container images to Quay.io</title>
<link>https://adriankoshka.github.io/blog/post/travis-and-quay/</link>
<pubDate>Thu, 24 Jan 2019 20:02:00 +0000</pubDate>

<guid>https://adriankoshka.github.io/blog/post/travis-and-quay/</guid>
<description>Preface This blog post assumes:
The user is familiar with: Travis-ci Docker (or podman/buildah) Git Github The user has an account with: Travis-ci Github Quay For those unfamiliar with the above, here are some resources
Introduction I prefer using Quay.io as my container registry instead of Dockerhub, and as such, I had to learn how setup Travis to push to quay.io. This is something I hadn&amp;rsquo;t done before, as I&amp;rsquo;ve only recently started making my own container images.</description>
</item>

</channel>
</rss>
1 change: 1 addition & 0 deletions docs/post/page/1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://adriankoshka.github.io/blog/post/</title><link rel="canonical" href="https://adriankoshka.github.io/blog/post/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://adriankoshka.github.io/blog/post/" /></head></html>
Loading

0 comments on commit 809138d

Please sign in to comment.