<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Guilherme B. Rezende on Medium]]></title>
        <description><![CDATA[Stories by Guilherme B. Rezende on Medium]]></description>
        <link>https://medium.com/@gbrezende?source=rss-58dc69802af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*x7BwTWdP5PYCF2Ys69mDuQ.jpeg</url>
            <title>Stories by Guilherme B. Rezende on Medium</title>
            <link>https://medium.com/@gbrezende?source=rss-58dc69802af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 03:28:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gbrezende/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tsuru in Production with Kubernetes]]></title>
            <link>https://medium.com/tsurupaas/tsuru-in-production-with-kubernetes-3e964fc3eeec?source=rss-58dc69802af------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e964fc3eeec</guid>
            <category><![CDATA[cert-manager]]></category>
            <category><![CDATA[tsuru]]></category>
            <category><![CDATA[helm-chart]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Guilherme B. Rezende]]></dc:creator>
            <pubDate>Mon, 01 Jul 2019 13:04:26 GMT</pubDate>
            <atom:updated>2019-07-02T18:41:00.705Z</atom:updated>
            <content:encoded><![CDATA[<p>This post will teach how to install Tsuru in Kubernetes and how to add the cluster to be used by Tsuru.</p><p>This how-to was made using Digitalocean Kubernetes. We will update the article when tested with other kubernetes like (AKS, GKE, EKS…).</p><p>Here we assume that you have a kubernetes cluster running and the kubectl context properly configured.</p><h3>Installing Helm/Tiller</h3><p>First install helm: <a href="https://github.com/helm/helm/blob/master/docs/install.md">https://github.com/helm/helm/blob/master/docs/install.md</a></p><p>With helm installed, lets install tiller. (it’s just one way to install tiller, you can see other ways at: <a href="https://github.com/helm/helm/blob/240e539cec44e2b746b3541529d41f4ba01e77df/docs/rbac.md">https://github.com/helm/helm/blob/240e539cec44e2b746b3541529d41f4ba01e77df/docs/rbac.md</a></p><pre>$ cat rbac-tiller-config.yaml</pre><pre>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: tiller<br>  namespace: kube-system<br>---<br>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRoleBinding<br>metadata:<br>  name: tiller<br>roleRef:<br>  apiGroup: rbac.authorization.k8s.io<br>  kind: ClusterRole<br>  name: cluster-admin<br>subjects:<br>  - kind: ServiceAccount<br>    name: tiller<br>    namespace: kube-system</pre><pre>$ kubectl create -f rbac-tiller-config.yaml</pre><p>Now lets install tiller:</p><pre>helm init --service-account tiller</pre><p>Great! now you can install cert-manager and tsuru using helm charts :)</p><h3>Prepare cluster to install Cert-manager</h3><p>We will use cert-manager to manage tls certificates with letsencrypt.</p><p>You can get the steps from <a href="https://docs.cert-manager.io/en/latest/getting-started/install/kubernetes.html#steps">https://docs.cert-manager.io/en/latest/getting-started/install/kubernetes.html#steps</a>, but tsuru charts will install cert-manager as a dependency, so you only need to do the follow steps:</p><p>Create the custom-resource:</p><pre>kubectl apply -f <a href="https://raw.githubusercontent.com/jetstack/cert-manager/release-0.8/deploy/manifests/00-crds.yaml">https://raw.githubusercontent.com/jetstack/cert-manager/release-0.8/deploy/manifests/00-crds.yaml</a></pre><p>And label the namespace that we will install cert-manager (without this label cert-manager-webhook will fail to validate certificates)</p><p>Create the namespace and the label:</p><pre>kubectl create namespace tsuru-manager</pre><pre>kubectl label namespace tsuru-manager certmanager.k8s.io/disable-validation=true</pre><h3>Installing Tsuru</h3><p>To install Tsuru and its dependencies we will use a helm chart (thanks for <a href="https://github.com/gfleury">gfleury</a> who created the chart).</p><p>First clone the chart:</p><pre>git clone <a href="https://github.com/tsuru/tsuru-helm-chart">https://github.com/tsuru/tsuru-helm-chart</a> &amp;&amp; cd tsuru-helm-chart</pre><p>Install dependencies:</p><pre>helm dep up .</pre><p>Install the chart with ingress disabled (we will enable it later):</p><pre>helm install --name tsuru --namespace tsuru-manager . \<br>    --set ingress.enabled=false</pre><p>Create the letsencrypt issuer (change the email field!!):</p><pre>$ cat letsencrypt-prod.yaml</pre><pre>apiVersion: certmanager.k8s.io/v1alpha1<br>kind: ClusterIssuer<br>metadata:<br>  name: letsencrypt-prod <br>  namespace: tsuru-manager<br>spec:<br>  acme:<br>    # You must replace this email address with your own.<br>    # Let&#39;s Encrypt will use this to contact you about expiring<br>    # certificates, and issues related to your account.<br>    email: <a href="/service/mailto:guilhermebr@gmail.com">YOUR_EMAIL@gmail.com</a><br>    server: <a href="https://acme-v02.api.letsencrypt.org/directory">https://acme-v02.api.letsencrypt.org/directory</a><br>    privateKeySecretRef:<br>      # Secret resource used to store the account&#39;s private key.<br>      name: letsencrypt-prod-pk<br>    # Add a single challenge solver, HTTP01 using nginx<br>    solvers:<br>    - http01:<br>        ingress:<br>          class: nginx</pre><pre>$ kubectl apply -f letsencrypt-prod.yaml</pre><p>Now you need to get the ingress-controller loadbalancer IP:</p><pre>export LB_HOSTNAME=$(kubectl -n tsuru-manager get services tsuru-nginx-ingress-controller -o jsonpath=&quot;{.status.loadBalancer.ingress[0].ip}&quot;)</pre><pre>echo $LB_HOSTNAME</pre><p>If you have a domain, it’s time to point the dns to LB_HOSTNAME.</p><p>In order to use with kube-router, you need to add a wildcard domain pointing to the LB_HOSTNAME.</p><p>If you don’t have or don’t want to use a domain now, you can use nip.io.</p><p>Changing hostnames in tsuru installation:</p><pre>$ HOSTNAME=&quot;cloud.$LB_HOSTNAME.nip.io&quot; # or your own domain</pre><pre>helm upgrade tsuru --namespace tsuru-manager . \<br>  --set ingress.enabled=true \ <br>  --set ingress.domain=$HOSTNAME \  <br>  --set ingress.tls[0].hosts[0]=tsuru.$HOSTNAME \<br>  --set docker-registry.ingress.hosts[0]=registry.$HOSTNAME \<br>  --set docker-registry.ingress.tls[0].hosts[0]=registry.$HOSTNAME \<br>  --set ingress.tls[0].secretName=tsuru-api \<br>  --set docker-registry.ingress.tls[0].secretName=registry-tls \<br>  --set registry.enabled=true \<br>  --set registry.url=registry.$HOSTNAME</pre><p>Now you have tsuru installed with tls!!</p><h3>Configuring Tsuru</h3><p>Create the admin user on tsuru:</p><pre>export POD_NAME=$(kubectl -n tsuru-manager get pods -l “app=tsuru,release=tsuru” -o jsonpath=”{.items[0].metadata.name}”)</pre><pre>kubectl -n tsuru-manager exec -it $POD_NAME tsurud root-user-create <a href="/service/mailto:admin@example.com">admin@example.com</a> # CHANGE IT TO YOUR ADMIN USER #</pre><p>Create the tsuru-target and log in:</p><pre>tsuru target-add -s default <a href="https://tsuru.cloud.138.197.237.58.nip.io/">https://</a>$HOSTNAME</pre><pre>tsuru login</pre><p>Create pool, and add kubernetes cluster to be managed by tsuru:</p><pre>tsuru pool-add mypool -p -d --provisioner kubernetes</pre><pre>export SA_NAME=$(kubectl -n tsuru-manager get sa -l &quot;app=tsuru-tsuru-api,release=tsuru&quot;  -o jsonpath=&quot;{.items[0].secrets[0].name}&quot;)<br>  <br>export K8S_TOKEN=$(kubectl -n tsuru-manager get secret $SA_NAME -o jsonpath=&quot;{.data.token}&quot; | base64 -d)</pre><pre>kubectl -n tsuru-manager get secret $SA_NAME -o jsonpath=&quot;{.data.ca\.crt}&quot; | base64 -d &gt; ca.crt</pre><pre>tsuru cluster-add kube-prod kubernetes \<br>  --addr=<a href="https://kubernetes/">https://kubernetes</a>.default.svc.cluster.local \  <br>  --cacert ca.crt \ <br>  --custom token=$K8S_TOKEN \<br>  --default</pre><p>We need to update nodes to add pool:</p><pre>tsuru node list -q | xargs -I{} sh -c &quot;tsuru node-update {} pool=mypool&quot;</pre><p>Create one team:</p><pre>tsuru team-create admin</pre><p>Create and Deploy tsuru-dashboard app:</p><pre>tsuru app-create dashboard --router-opts tls-acme=true</pre><pre>tsuru app-deploy -a dashboard -i tsuru/dashboard</pre><p>Build Platforms:</p><pre>tsuru platform-add python</pre><pre>tsuru platform-add go</pre><p>Create an app to test:</p><pre>mkdir example-go &amp;&amp; cd example-go</pre><pre>wget <a href="https://raw.githubusercontent.com/tsuru/platforms/master/examples/go/tsuru.yml">https://raw.githubusercontent.com/tsuru/platforms/master/examples/go/tsuru.yml</a></pre><pre>wget <a href="https://raw.githubusercontent.com/tsuru/platforms/master/examples/go/web.go">https://raw.githubusercontent.com/tsuru/platforms/master/examples/go/web.go</a></pre><pre>tsuru app-create example-go go </pre><pre>tsuru app-deploy -a example-go .</pre><p>Check the app info and get the url:</p><pre>tsuru app-info -a example-go</pre><p>Please leave us a comment telling if everything went well, if you had any problems or if you needed an extra step, etc …</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e964fc3eeec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tsurupaas/tsuru-in-production-with-kubernetes-3e964fc3eeec">Tsuru in Production with Kubernetes</a> was originally published in <a href="https://medium.com/tsurupaas">tsurupaas</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tsuru PaaS on Google Cloud Platform]]></title>
            <link>https://medium.com/tsurupaas/tsuru-paas-on-google-cloud-platform-21640abb4386?source=rss-58dc69802af------2</link>
            <guid isPermaLink="false">https://medium.com/p/21640abb4386</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[paas]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Guilherme B. Rezende]]></dc:creator>
            <pubDate>Mon, 15 May 2017 19:20:05 GMT</pubDate>
            <atom:updated>2018-04-25T23:21:28.975Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tsuru.io/">Tsuru</a> is an <a href="https://opensource.globo.com/en/">Open-Source</a> Multi-Provisioner Platform as a Service created by <a href="http://www.globo.com/">Globo.com</a>, with more than 4 years orchestrating and running docker in production.</p><p>Tsuru comes with its own orchestrator, but you can add both <a href="https://docs.docker.com/engine/swarm/">Swarm</a> and <a href="https://kubernetes.io/">Kubernetes</a> clusters, in a hybrid cloud with multi orchestrators scenario.</p><p>In this article, we will show how to run Tsuru on <a href="https://cloud.google.com/">Google Cloud Platform (GCP)</a>, and in the next articles how to run Swarm and Kubernetes on <a href="https://medium.com/u/4f3f4ee0f977">Google Cloud</a> and add them as clusters in Tsuru.</p><h3>Starting with Google Cloud Platform</h3><p>Google Cloud Platform have a lot of API&#39;s for Cloud Computing. To run Tsuru we will use <a href="https://cloud.google.com/compute/">Google Compute Engine</a>, that provides an API to create and manage virtual machines.</p><h4>Free-Trial Account</h4><p>Google Cloud gives you 1 year with $300 in credit to play. Create your account (if you don&#39;t have yet) at: <a href="https://cloud.google.com/free/">https://cloud.google.com/free/</a></p><h4>Project</h4><p>Go to <a href="https://console.cloud.google.com/">https://console.cloud.google.com/</a> and create a new project.</p><h4>Google Compute Engine API</h4><p>Go to <a href="https://console.developers.google.com/apis/api/compute_component/">https://console.developers.google.com/apis/api/compute_component</a> and activate the Google Compute Engine API</p><h4>Google Cloud SDK</h4><p>Download Google Cloud SDK at <a href="http://cloud.google.com/sdk">http://cloud.google.com/sdk</a> and install in your machine.</p><h4>Initialize</h4><p>Now that you have the SDK installed, initialize it, log-in at your account and select the project-id you have created before. (if you only have one, it will be selected for you)</p><pre>$ gcloud init</pre><p>If you already have gcloud initialized, you can just set it to use the new project:</p><pre>$ gcloud config set project tsuru-test</pre><p>And don&#39;t forget to set the default login:</p><pre>$ gcloud auth application-default login</pre><h3>Starting with Tsuru</h3><h4>Tsuru client</h4><p>Follow the instructions to install tsuru-client: <a href="https://docs.tsuru.io/stable/using/install-client.html">https://docs.tsuru.io/stable/using/install-client.html</a>.</p><p>You can also install Tsuru bash (or zsh) completion script.</p><pre>$ mv misc/bash-completion ~/.tsuru-completion.bash</pre><pre>$ echo &quot;if [ -f &#39;$HOME/.tsuru-completion.bash&#39; ]; then source &#39;$HOME/.tsuru-completion.bash&#39;; fi&quot; &gt;&gt; ~/.profile</pre><pre>$ source ~/.profile</pre><h4>Tsuru Installer</h4><p>Create a yaml file with the following content, replace the value of <strong>google-project</strong> key with the project-id you created before.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b2d9a9b43ec89aa8f698cfe3b255999/href">https://medium.com/media/7b2d9a9b43ec89aa8f698cfe3b255999/href</a></iframe><p>Tsuru Installer uses <a href="https://github.com/docker/machine/tree/master/libmachine">docker-machine package</a>, so you can use any supported flags. You can see more about google driver for docker-machine at <a href="https://docs.docker.com/machine/drivers/gce/#example">https://docs.docker.com/machine/drivers/gce</a></p><p>Now call Tsuru installer passing the file config to install Tsuru on GCP.</p><pre>$ tsuru install-create -c tsuru-gce.yml</pre><pre>Running pre-install checks...<br>Running pre-create checks...<br>(tsuru-gce-1) Check that the project exists<br>(tsuru-gce-1) Check if the instance already exists<br>Creating machine...<br>...<br><em>--- Installation Overview ---<br>Core Hosts:<br>+---------------+-------+---------+<br>| IP            | State | Manager |<br>+---------------+-------+---------+<br>| 146.148.36.59 | ready | true    |<br>+---------------+-------+---------+</em></pre><pre><em>Core Components:<br>+----------------+-------+----------+<br>| Component      | Ports | Replicas |<br>+----------------+-------+----------+<br>| tsuru_registry | 5000  | 1        |<br>+----------------+-------+----------+<br>| tsuru_redis    |       | 1        |<br>+----------------+-------+----------+<br>| tsuru_planb    | 80    | 1        |<br>+----------------+-------+----------+<br>| tsuru_mongo    |       | 1        |<br>+----------------+-------+----------+<br>| tsuru_tsuru    | 8080  | 1        |<br>+----------------+-------+----------+<br>Configured default user:<br>Username: </em><a href="/service/mailto:admin@example.com"><em>admin@example.com</em></a><em><br>Password: ********<br>...</em></pre><p>Now you have Tsuru installed on GCP and the client already configured to use it.</p><pre>$ tsuru target-list <br>* tsuru-gce (<a href="http://146.148.36.59:8080/">http://146.148.36.59:8080</a>)</pre><pre>$ tsuru node-list<br><em>+-------------------------+---------+--------+----------------------<br>| Address                 | IaaS ID | Status | Metadata                         <br>+-------------------------+---------+--------+----------------------<br>| </em><a href="https://10.128.0.2:2376/"><em>https://10.128.0.2:2376</em></a><em> |         | ready  | LastSuccess=2017-05-           |                         |         |        | 12T18:58:28Z<br>|                         |         |        | pool=theonepool                  <br>+-------------------------+---------+--------+----------------------</em></pre><pre>$ tsuru app-list<br><em>+-----------------+-------------------------+-----------------------<br>| Application     | Units State Summary     | Address                              <br>+-----------------+-------------------------+-----------------------<br>| tsuru-dashboard | 1 of 1 units in-service | tsuru-dashboard.              |                 |                         | 146.148.36.59.nip.io<br>+-----------------+-------------------------+-----------------------</em></pre><p>Before you access tsuru-dashboard, you need to open the port 80 in GCP Firewall.</p><pre><em>$ </em>gcloud compute firewall-rules create tsuru-apps \<br>  --allow tcp:80 \<br>  --source-ranges 0.0.0.0/0 \<br>  --target-tags tsuru \<br>  --project [project-id]</pre><p>Now go and access tsuru-dashboard address at your browser.</p><p>You can learn how to install platforms and create apps accessing Tsuru documentation: <a href="https://docs.tsuru.io/stable/using/quickstart.html">https://docs.tsuru.io/stable/using/quickstart.html</a></p><h3>Next…</h3><p>Now you have a fresh Tsuru running with the default orchestrator docker-cluster. In next article, you will learn how to run a Swarm Cluster on Google Cloud Platform and add the cluster to Tsuru.</p><p>For more information about Tsuru, check out the <a href="https://docs.tsuru.io/stable/">docs</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21640abb4386" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tsurupaas/tsuru-paas-on-google-cloud-platform-21640abb4386">Tsuru PaaS on Google Cloud Platform</a> was originally published in <a href="https://medium.com/tsurupaas">tsurupaas</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>