<?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 Campion on Medium]]></title>
        <description><![CDATA[Stories by Campion on Medium]]></description>
        <link>https://medium.com/@campionfellin?source=rss-3bea2b6f4f4a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VVY7_UwNBpOFSRE38iNz9g.jpeg</url>
            <title>Stories by Campion on Medium</title>
            <link>https://medium.com/@campionfellin?source=rss-3bea2b6f4f4a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 01:28:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@campionfellin/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[Un-symbolicating macOS app crash logs]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/macoclock/un-symbolicating-macos-app-crash-logs-1881d1bf6e8c?source=rss-3bea2b6f4f4a------2"><img src="https://cdn-images-1.medium.com/max/1200/1*OVgSA8lppCUu7idWMgMMyw.png" width="1200"></a></p><p class="medium-feed-snippet">The easy way!</p><p class="medium-feed-link"><a href="https://medium.com/macoclock/un-symbolicating-macos-app-crash-logs-1881d1bf6e8c?source=rss-3bea2b6f4f4a------2">Continue reading on Mac O’Clock »</a></p></div>]]></description>
            <link>https://medium.com/macoclock/un-symbolicating-macos-app-crash-logs-1881d1bf6e8c?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1881d1bf6e8c</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[macos]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Wed, 12 Aug 2020 04:46:11 GMT</pubDate>
            <atom:updated>2020-08-12T04:51:56.411Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Write access to a folder with Swift]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/macoclock/write-access-to-a-folder-with-swift-e7137b0e5889?source=rss-3bea2b6f4f4a------2"><img src="https://cdn-images-1.medium.com/max/1200/1*OVgSA8lppCUu7idWMgMMyw.png" width="1200"></a></p><p class="medium-feed-snippet">The easy way!</p><p class="medium-feed-link"><a href="https://medium.com/macoclock/write-access-to-a-folder-with-swift-e7137b0e5889?source=rss-3bea2b6f4f4a------2">Continue reading on Mac O’Clock »</a></p></div>]]></description>
            <link>https://medium.com/macoclock/write-access-to-a-folder-with-swift-e7137b0e5889?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7137b0e5889</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Fri, 24 Jul 2020 04:56:39 GMT</pubDate>
            <atom:updated>2020-07-24T04:56:39.509Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Splitting Audio with Swift]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/macoclock/splitting-audio-with-swift-ba765281c50?source=rss-3bea2b6f4f4a------2"><img src="https://cdn-images-1.medium.com/max/1200/1*OVgSA8lppCUu7idWMgMMyw.png" width="1200"></a></p><p class="medium-feed-snippet">The easy way!</p><p class="medium-feed-link"><a href="https://medium.com/macoclock/splitting-audio-with-swift-ba765281c50?source=rss-3bea2b6f4f4a------2">Continue reading on Mac O’Clock »</a></p></div>]]></description>
            <link>https://medium.com/macoclock/splitting-audio-with-swift-ba765281c50?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba765281c50</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[audio]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Fri, 10 Jul 2020 14:53:03 GMT</pubDate>
            <atom:updated>2020-07-13T07:42:45.745Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Using cdk8s to manage your k8s app on Google Cloud — Part 2]]></title>
            <link>https://medium.com/@campionfellin/using-cdk8s-to-manage-your-k8s-app-on-google-cloud-part-2-1dd8cdb0fb2c?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1dd8cdb0fb2c</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Fri, 27 Mar 2020 16:20:23 GMT</pubDate>
            <atom:updated>2020-03-27T16:20:23.064Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using cdk8s to manage your k8s app on Google Cloud — Part 2</h3><p>A fair bit of background on k8s is required for this tutorial.</p><p>This is a follow up to <a href="https://medium.com/@campionfellin/using-cdk8s-to-manage-your-k8s-app-on-google-cloud-part-1-1285b3e6a6ad">Part 1</a>, you should read that if you haven’t already.</p><p>In Part 2 of this tutorial here, you’ll really get to see the power of cdk8s and the improvements it can have on your deployment workflow.</p><p>In the last tutorial, we deployed your microservice by defining a new Service and a new Deployment . Now what if you have a whole lot of microservices?</p><p>Let’s refactor our code a bit. Take the Service and Deployment that you defined and we’ll put them into a higher level construct, like this:</p><pre>export interface MicroServiceProps {<br>  containerName: string<br>  image: string<br>  replicas?: number<br>}</pre><pre>export class MicroService extends Construct {<br>  constructor(scope: Chart, id: string, props: MicroServiceProps) {<br>    super(scope, id);</pre><pre>    const label = { app: Node.of(this).uniqueId };</pre><pre>    new Service(this, `service`, {<br>      spec: {<br>        type: &#39;LoadBalancer&#39;,<br>        ports: [ { port: 80, targetPort: 8080 } ],<br>        selector: label<br>      }<br>    });</pre><pre>    new Deployment(this, `deployment`, {<br>      spec: {<br>        replicas: props.replicas || 2,<br>        selector: {<br>          matchLabels: label<br>        },<br>        template: {<br>          metadata: { labels: label },<br>          spec: {<br>            containers: [{<br>              name: this.props.containerName,<br>              image: props.image,<br>              ports: [ { containerPort: 8080 } ]<br>            }]<br>          }<br>        }<br>      }<br>    });<br>  }<br>}</pre><p>Now if you’re familiar with <a href="https://github.com/aws/aws-cdk">AWS CDK</a> you’ll recognize how this works. I’m creating a <em>Construct</em> that will create a new Service and new Deployment just like before. We’re also passing in MicroServiceProps so we can change things like the label , image , and number of replicas .</p><p>I’ve now abstracted away all the port configuration for the LoadBalancer and deployment containers because in our use case we always want 80 →8080.</p><p>Back in our main Chart , we can replace what we had with this:</p><pre>new MicroService(this, &#39;microservice1&#39;, {<br>  containerName: &#39;mycontainer1&#39; <br>  image: &#39;&lt;GCR or DockerHub image&gt;&#39;,<br>});</pre><p>And we can add another microservice just as easily, this time overwriting the default 2 replicas to be 10:</p><pre>new MicroService(this, &#39;microservice2&#39;, {<br>  containerName: &#39;mycontainer2&#39;<br>  image: &#39;&lt;GCR or DockerHub image&gt;&#39;,<br>  replicas: 10<br>});</pre><p>and so on and so forth. As a developer, you’re now spared the pain from repetitively writing the deployment template spec, the port configuration, etc.</p><p><em>You’re now more able to focus on what really matters for your application</em>: the image it runs, and how many replicas it has.</p><p>Congrats! You’ve just made your first cdk8s construct!</p><p>Be sure to follow along with <a href="https://github.com/awslabs/cdk8s">https://github.com/awslabs/cdk8s</a> as more Constructs are made to simplify your k8s deployments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1dd8cdb0fb2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using cdk8s to manage your k8s app on Google Cloud — Part 1]]></title>
            <link>https://medium.com/@campionfellin/using-cdk8s-to-manage-your-k8s-app-on-google-cloud-part-1-1285b3e6a6ad?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1285b3e6a6ad</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cdk8s]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Wed, 18 Mar 2020 19:40:39 GMT</pubDate>
            <atom:updated>2020-03-27T16:21:11.946Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using cdk8s to manage your k8s app on Google Cloud — Part 1</h3><p>A fair bit of background on k8s is required for this tutorial.</p><p>If you haven’t yet read <a href="https://medium.com/google-cloud/deploying-your-nodejs-app-with-docker-and-kubernetes-on-gcp-5dee8df5d896">Deploying your NodeJS app with Docker and Kubernetes on GCP</a> you should start there, as this tutorial will pick up where we left off, but right before “<strong>Deploy to Google Kubernetes Engine</strong>”</p><p>Instead of using the <strong>gcloud</strong> CLI to manipulate our cluster, we’re going to be using <a href="https://github.com/awslabs/cdk8s">cdk8s</a>, a Cloud Development Kit for Kubernetes. cdk8shelps you</p><blockquote>Define Kubernetes native apps and abstractions using object-oriented programming</blockquote><p>Not only that, but cdk8s works with any cloud provider! That means that all the commands below will work with <em>whatever Kubernetes cluster you have</em> that’s set up on <em>whatever cloud you want to use</em>.</p><p>To start, we’ll assume a couple things:</p><ul><li>You have a NodeJS microservice</li><li>That service is Docker-ized</li><li>The docker image has been uploaded to GCR or Docker Hub</li></ul><p>Let’s start a blank cdk8sproject using the cdk8s-cli</p><pre>npm i -g cdk8s-cli<br>mkdir hello-cdk8s &amp;&amp; cd hello-cdk8s<br>cdk8s init typescript-app</pre><p>We can see that it created a new cdk8s project for us, with everything we need to get started. Let’s open up main.ts to take a look at our k8s resources. You should see something like:</p><pre>import { Construct } from &#39;constructs&#39;;<br>import { App, Chart } from &#39;cdk8s&#39;;</pre><pre>class MyChart extends Chart {<br>  constructor(scope: Construct, name: string) {<br>    super(scope, name);<br>    <br>    // define constructs here<br>  }<br>}</pre><pre>const app = new App();<br>new MyChart(app, &#39;hello-cdk8s&#39;);<br>app.synth();</pre><p>Inside your MyChart you can define the resources (<em>Constructs</em>) for your cluster. Let’s define a label / selectorfor our resources.</p><pre>const label = { app: &#39;hello-k8s&#39; };</pre><p>And let’s define a LoadBalancer Service that will serve our application:</p><pre>import { Service } from &#39;./imports/k8s&#39;;</pre><pre>new Service(this, &#39;service&#39;, {<br>  spec: {<br>    type: &#39;LoadBalancer&#39;,<br>    ports: [ { port: 80, targetPort: 8080} ],<br>    selector: label<br>  }<br>});</pre><p>And let’s also define our Deployment :</p><pre>import { Deployment } from &#39;./imports/k8s&#39;</pre><pre>new Deployment(this, &#39;deployment&#39;, {<br>  spec: {<br>    replicas: 1,<br>    selector: {<br>      matchLabels: label<br>    },<br>    template: {<br>      metadata: { labels: label },<br>      spec: {<br>        containers: [<br>          {<br>            name: &#39;cdk8s-medium&#39;,<br>            image: &#39;&lt;GCR or dockerhub link&gt;&#39;,<br>            ports: [ { containerPort: 8080 } ]<br>          }<br>        ]<br>      }<br>    }<br>  }<br>});</pre><p>Now run yarn build</p><p>This will transpile your main.ts to main.js and then synthesize the template into a k8s template which we can apply to our cluster.</p><p>Before deploying we can check the dist/main.k8s.yaml and it should look like this:</p><pre>spec:<br>  type: LoadBalancer<br>  ports:<br>    - port: 80<br>      targetPort: 8080<br>  selector:<br>  app: hello-k8s<br>kind: Service<br>apiVersion: v1<br>metadata:<br>name: hello-k8s-service-c66cdbfd<br>---<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: hello-k8s<br>  template:<br>    metadata:<br>      labels:<br>        app: hello-k8s<br>    spec:<br>      containers:<br>        - name: cdk8s-medium<br>          image: &lt;GCR or dockerhub link&gt;<br>          ports:<br>            - containerPort: 8080<br>kind: Deployment<br>apiVersion: apps/v1<br>metadata:<br>  name: hello-k8s-deployment-263195ce</pre><p>Which we can apply to our cluster!</p><pre>kubectl apply -f dist/main.k8s.yaml</pre><p>And you should see:</p><pre>service/hello-k8s-service-c66cdbfd created<br>deployment.apps/hello-k8s-deployment-263195ce created</pre><p>We can find the External-IP of our Service with kubectl get service and opening that up we can see our service.</p><p>Congrats! You’ve now deployed your first k8s application using cdk8s . Follow along in <a href="https://medium.com/@campionfellin/using-cdk8s-to-manage-your-k8s-app-on-google-cloud-part-2-1dd8cdb0fb2c">Part 2</a> to see how you can really harness the power of cdk8s .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1285b3e6a6ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[More Functions on Google Cloud]]></title>
            <link>https://medium.com/google-cloud/more-functions-on-google-cloud-69c44a514661?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/69c44a514661</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-cloud-functions]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Wed, 09 May 2018 16:46:20 GMT</pubDate>
            <atom:updated>2018-05-09T16:46:20.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*7ODsiX7lD0wUflyy6v8bhg.png" /><figcaption>Google Cloud</figcaption></figure><p>If you haven’t yet read my last article, <a href="https://medium.com/google-cloud/deploying-a-functions-serverless-app-on-google-cloud-e8f0e3011b2b">Deploying a Functions (serverless) app on Google Cloud</a>, you should check it out to give you context for this one.</p><h3>We’ll assume that:</h3><ul><li>You have the gcloud tool installed</li><li>You have a project in <a href="http://console.cloud.google.com/">GCP</a></li></ul><blockquote>Note: you must have the <em>gcloud</em> beta version installed</blockquote><p>To install gcloud beta use:</p><pre>gcloud components update &amp;&amp; gcloud components install beta</pre><h3>Recap</h3><p>Last time, we made a Functions App that looked like this:</p><pre>exports.helloFunctions = (req, res) =&gt; {<br>  res.send(&#39;Hello Functions!&#39;);<br>};</pre><p>It simply sent back Hello Functions! when you hit the endpoint. Now let’s go ahead and expand on that. We’re going to make a text-based adventure game (think <a href="https://en.wikipedia.org/wiki/Zork">Zork</a>).</p><h3>What Do We Want?</h3><p>We can think of each <em>step</em> in the adventure as a Function. So, when you start the game, <em>that’s a Function</em>, when you choose to go one way<em>, that’s a Function</em>, or when you choose to go the other way, again, <em>that’s a Function</em>.</p><h4>So how can we make this work?</h4><p>Let’s start with an HTML template, which will display a message and two links:</p><pre>let template = ({ message, opt1, opt2, opt1Label, opt2Label }) =&gt; {<br>  return `<br>    &lt;!DOCTYPE html&gt;<br>    &lt;html&gt;<br>      &lt;head&gt;<br>      &lt;/head&gt;<br>      &lt;body&gt;<br>        &lt;p&gt;${message}&lt;/p&gt;<br>        &lt;div&gt;&lt;a href=&#39;${opt1}&#39;&gt;${opt1Label}&lt;/a&gt;&lt;/div&gt;<br>        &lt;div&gt;&lt;a href=&#39;${opt2}&#39;&gt;${opt2Label}&lt;/a&gt;&lt;/div&gt;<br>      &lt;/body&gt;<br>    &lt;/html&gt;<br>  `</pre><p>As we can see here, the template takes in a message, a couple of links, and a couple of labels for those links.</p><h4>Now, let’s serve up our adventure!</h4><p>We’ll make a new function, called startAdventure that will welcome our player to the game and give them two options:</p><pre>exports.startAdventure = (req, res) =&gt; {<br>  res.status(200).send(template({<br>  message: `Greetings adventurer... Let us begin.<br>  Are you a knight or an elf?<br>  `,<br>  opt1: req.url + &quot;Knight&quot;,<br>  opt2: req.url + &quot;Elf&quot;,<br>  opt1Label: &quot;I am a knight, strong and skilled with a sword.&quot;,<br>  opt2Label: &quot;An elf, am I, known for my ranged ability.&quot;<br>  }));<br>};</pre><p>Now let’s deploy the start of our adventure:</p><p>gcloud beta functions deploy startAdventure --trigger-http</p><p>This deploys the start of our adventure. It should output the URL, but if you miss it the format is:</p><p>https://[GCP-REGION]-[PROJECT_ID].cloudfunctions.net/startAdventure</p><p>You can open up that webpage and see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*5o3nme1-EAq4kYd-nHziMQ.png" /><figcaption><a href="https://[GCP-REGION]-[PROJECT_ID].cloudfunctions.net/startAdventure">https://[GCP-REGION]-[PROJECT_ID].cloudfunctions.net/startAdventure</a></figcaption></figure><p>However, these links don’t work yet. Let’s write the one for the knight:</p><pre>exports.Knight = (req, res) =&gt; {<br>  res.status(200).send(template({<br>    message: `So you are a Knight..<br>    Where do you want to go?<br>    `,<br>    opt1: req.url + &quot;Castle&quot;,<br>    opt2: req.url + &quot;Mountain&quot;,<br>    opt1Label: &quot;To the castle! I might talk to the princess.&quot;,<br>    opt2Label: &quot;I see a dragon in the distance, to the mountain!&quot;<br>  }));<br>};</pre><p>Now let’s deploy this:</p><p>gcloud beta functions deploy Knight --trigger-http</p><p>So now when you click that first link, you should end up here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*qJq31m1Hz21I6YuwgzMgzw.png" /><figcaption><a href="https://[GCP-REGION]-[PROJECT_ID].cloudfunctions.net/Knight">https://[GCP-REGION]-[PROJECT_ID].cloudfunctions.net/Knight</a></figcaption></figure><h3>So How Does This Work?</h3><p>Well, when we made our startAdventure function, we told it to serve an HTML page (the one above) with links to req.url + Knight and req.url + Elf . You’ll notice that when you click on the Knight link, the URL changes, ending with Knight now instead of startAdventure . And we can see that our Knight page links to Castle and Mountain .</p><h3>What’s Next?</h3><p>Go ahead and keep going! The possibilities are endless</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl2Sq9mzrjHG39i0i4%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl2Sq9mzrjHG39i0i4%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl2Sq9mzrjHG39i0i4%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="234" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb98f5b2d82e37c59f6566cf544b6abe/href">https://medium.com/media/eb98f5b2d82e37c59f6566cf544b6abe/href</a></iframe><p>I encourage you to continue developing your adventure! You can change the template if you want to customize it with more options or even an image.</p><p>And the best part?</p><blockquote>Functions are 💲🆓.⁹⁹ (FREE)!</blockquote><p>Here is the <a href="https://cloud.google.com/functions/pricing">Pricing</a> if you don’t believe me.</p><h3>Thanks for reading! If you have any questions, comment below! 👋</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69c44a514661" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/more-functions-on-google-cloud-69c44a514661">More Functions on Google Cloud</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Functions (serverless) app on Google Cloud]]></title>
            <link>https://medium.com/google-cloud/deploying-a-functions-serverless-app-on-google-cloud-e8f0e3011b2b?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8f0e3011b2b</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[cloud-functions]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Thu, 19 Apr 2018 15:10:53 GMT</pubDate>
            <atom:updated>2018-04-19T15:10:53.597Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*6pm1fXg4O8JnHPB6hYa8UA.png" /><figcaption>Google Cloud</figcaption></figure><p><em>This tutorial will show you how to deploy a Functions app to Google Cloud</em></p><h3>Prerequisites</h3><ul><li>You have the gcloud tool installed</li><li>You have a project in <a href="http://console.cloud.google.com/">GCP</a></li></ul><blockquote>Note: you must have the gcloud beta version installed</blockquote><p>To install gcloud beta use:</p><pre>gcloud components update &amp;&amp; gcloud components install beta</pre><h3>Let’s Get Started</h3><p>First, let’s make a directory and enter it:</p><pre>mkdir ~/hello_functions &amp;&amp; cd hello_functions</pre><p>Now, make a index.js file and put this in it:</p><pre>exports.helloFunctions = (req, res) =&gt; {<br>  res.send(&#39;Hello Functions!&#39;);<br>};</pre><p>This makes a function called helloFunctions that responds to a GET request with Hello Functions!</p><h3>That’s it?</h3><p>Yep, pretty much. Let Google Cloud do the rest.</p><p>Make sure your Project ID (from GCP) is set as an environmental variable and configure gcloud to use it:</p><pre>PROJECT_ID=&lt;project-id&gt;<br>gcloud config set project $PROJECT_ID</pre><p>Now to deploy your Functions app:</p><pre>gcloud beta functions deploy helloFunctions --trigger-http</pre><blockquote>Note: it may ask you to enable the functions API, go ahead and say yes</blockquote><p>Once it’s deployed, you can find your function’s URL with:</p><pre>gcloud beta functions describe helloFunctions | grep url</pre><p>The URL should look like:</p><pre>https://[GCP-REGION]-[PROJECT_ID].cloudfunctions.net/helloFunctions</pre><p>Open that URL in your browser and you should see Hello Functions!</p><h3>Testing Locally</h3><p>If you want to test your Function locally before deploying, the <a href="https://github.com/GoogleCloudPlatform/cloud-functions-emulator">cloud-functions-emulator</a> makes it super easy!</p><p>First install the functions-emulator:</p><p>npm install -g @google-cloud/functions-emulator</p><p>Then start it up:</p><p>functions-emulator start</p><p>And now deploy the function locally:</p><p>functions-emulator deploy helloFunctions --trigger-http</p><p>And test it!</p><p>functions-emulator call helloFunctions</p><p>You should see something like:</p><pre>ExecutionId: d02ce9e7-bf2c-44fb-89ab-ab8445277ecd<br>Result: Hello Functions!</pre><h3>⒡ → 👋 Functions</h3><p>Thanks for reading! If you have any questions, comment below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8f0e3011b2b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/deploying-a-functions-serverless-app-on-google-cloud-e8f0e3011b2b">Deploying a Functions (serverless) app on Google Cloud</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying your Go app on Google App Engine]]></title>
            <link>https://medium.com/google-cloud/deploying-your-go-app-on-google-app-engine-5f4a5c2a837?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f4a5c2a837</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[google-app-engine]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Sat, 07 Apr 2018 15:27:59 GMT</pubDate>
            <atom:updated>2018-04-07T15:27:59.476Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*QXEQ6haUGYbH8xRArkrl6A.png" /><figcaption>Google Cloud Platform</figcaption></figure><p><em>This tutorial will show you how to deploy a Go app to both the GCP App Engine Standard and Flexible Environments</em></p><h3>Prerequisites</h3><ul><li>You have the gcloud tool installed</li><li>You have <a href="https://golang.org/doc/install">Go</a> installed</li><li>You have a project in <a href="http://console.cloud.google.com/">GCP</a></li></ul><h3>Let’s Get Started</h3><p>First, let’s make a directory and enter it:</p><pre>mkdir ~/hello-world-go &amp;&amp; cd hello-world-go</pre><p>Now make sure we set our GOPATH to this directory:</p><pre>export GOPATH=$(pwd):$GOPATH</pre><p>Next, we’ll set up our project directory:</p><pre>mkdir -p src/go-app &amp;&amp; cd src/go-app</pre><p>And now let’s go get the GCP App Engine library:</p><pre>go get -u google.golang.org/appengine/...</pre><p>Finally, we’ll set our Project ID (from GCP) as an environmental variable and configure gcloud to use it:</p><pre>PROJECT_ID=&lt;project-id&gt;<br>gcloud config set project $PROJECT_ID</pre><h3>Time to Write Some Some Code</h3><p>First we need to make an app.yaml file to configure your project’s settings:</p><pre>runtime: go<br>api_version: go1<br>env: standard<br>handlers:<br>- url: /.*<br>  script: _go_app</pre><p>This tells the App Engine that we want to use the Go runtime, that we want to use the Standard environment, and sets up the handlers for when the server gets a request.</p><blockquote>Take note of line 3 where it says <em>env: standard</em></blockquote><p>Now let’s make our main.go file for our server:</p><pre>package main</pre><pre>import (<br>  &quot;fmt&quot;<br>  &quot;net/http&quot;<br>  &quot;google.golang.org/appengine&quot;<br>)</pre><pre>func handler(w http.ResponseWriter, r *http.Request) {<br>  fmt.Fprintln(w, &quot;Hello, world!&quot;) // Response to request<br>}</pre><pre>func main() {<br>  http.HandleFunc(&quot;/&quot;, handler) // Set endpoint handler<br>  appengine.Main() // Start the server<br>}</pre><p>This first imports the libraries that we need, then sets up a handler for when you hit the / endpoint, and finally starts the server.</p><h3>Let’s Deploy!</h3><p>This is so easy, simply run:</p><pre>gcloud app deploy</pre><p>And make sure to hit Y when it asks you Do you want to continue (Y/n)?</p><blockquote>Protip: use <em>yes | gcloud app deploy</em> if you want to skip the confirmation</blockquote><p>Now, this should take ~30 seconds to deploy (<strong>sooooooo fast</strong>).</p><p>When it’s done either run gcloud app browse or open your browser to <a href="https://go-project69.appspot.com/">https://&lt;project-id&gt;.appspot.com/</a></p><h3>Bonus</h3><p>Above, we deployed our Go app to the App Engine Standard Environment. But now let’s see how easy it is to deploy to the Flexible Environment.</p><p>Remember our app.yaml file? Let’s change one word in line three:</p><pre>runtime: go<br>api_version: go1<br>env: flex<br>handlers:<br>- url: /.*<br>  script: _go_app</pre><p>Can you spot the difference? We changed env: standard to env: flex</p><p>Now simply re-run gcloud app deploy and hit Y again to confirm. Since we are deploying to the Flex Environment, this will take a bit longer (on the order of 3–5 minutes).</p><p>There’s different advantages for each environment, and I won’t discuss them here. However, if you want to look into it, there is a quick guide here on <a href="https://cloud.google.com/appengine/docs/the-appengine-environments">Choosing an App Engine Environment</a>.</p><h3>👋 ✌️</h3><p>Thanks for reading! If you have any questions, comment below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f4a5c2a837" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/deploying-your-go-app-on-google-app-engine-5f4a5c2a837">Deploying your Go app on Google App Engine</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying your Go app on Google App Engine]]></title>
            <link>https://medium.com/@campionfellin/deploying-your-go-app-on-google-app-engine-fdd446967e6d?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdd446967e6d</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Wed, 28 Mar 2018 16:14:33 GMT</pubDate>
            <atom:updated>2018-03-28T16:14:33.719Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*QXEQ6haUGYbH8xRArkrl6A.png" /><figcaption>Google Cloud Platform</figcaption></figure><p><em>This tutorial will show you how to deploy a Go app to both the GCP App Engine Standard and Flexible Environments</em></p><h3>Prerequisites</h3><ul><li>You have the gcloud tool installed</li><li>You have <a href="https://golang.org/doc/install">Go</a> installed</li><li>You have a project in <a href="http://console.cloud.google.com/">GCP</a></li></ul><h3>Let’s Get Started</h3><p>First, let’s make a directory and enter it:</p><pre>mkdir ~/hello-world-go &amp;&amp; cd hello-world-go</pre><p>Now make sure we set our GOPATH to this directory:</p><pre>export GOPATH=$(pwd):$GOPATH</pre><p>Next, we’ll set up our project directory:</p><pre>mkdir -p src/go-app &amp;&amp; cd src/go-app</pre><p>And now let’s go get the GCP App Engine library:</p><pre>go get -u google.golang.org/appengine/...</pre><p>Finally, we’ll set our Project ID (from GCP) as an environmental variable and configure gcloud to use it:</p><pre>PROJECT_ID=&lt;project-id&gt;<br>gcloud config set project $PROJECT_ID</pre><h3>Time to Write Some Some Code</h3><p>First we need to make an app.yaml file to configure your project’s settings:</p><pre>runtime: go<br>api_version: go1<br>env: standard<br>handlers:<br>- url: /.*<br>  script: _go_app</pre><p>This tells the App Engine that we want to use the Go runtime, that we want to use the Standard environment, and sets up the handlers for when the server gets a request.</p><blockquote>Take note of line 3 where it says env: standard</blockquote><p>Now let’s make our main.go file for our server:</p><pre>package main</pre><pre>import (<br>  &quot;fmt&quot;<br>  &quot;net/http&quot;<br>  &quot;google.golang.org/appengine&quot;<br>)</pre><pre>func handler(w http.ResponseWriter, r *http.Request) {<br>  fmt.Fprintln(w, &quot;Hello, world!&quot;) // Response to request<br>}</pre><pre>func main() {<br>  http.HandleFunc(&quot;/&quot;, handler) // Set endpoint handler<br>  appengine.Main() // Start the server<br>}</pre><p>This first imports the libraries that we need, then sets up a handler for when you hit the / endpoint, and finally starts the server.</p><h3>Let’s Deploy!</h3><p>This is so easy, simply run:</p><pre>gcloud app deploy</pre><p>And make sure to hit Y when it asks you Do you want to continue (Y/n)?</p><blockquote>Protip: use yes | gcloud app deploy if you want to skip the confirmation</blockquote><p>Now, this should take ~30 seconds to deploy (<strong>sooooooo fast</strong>).</p><p>When it’s done either run gcloud app browse or open your browser to <a href="https://go-project69.appspot.com/">https://&lt;project-id&gt;.appspot.com/</a></p><h3>Bonus</h3><p>Above, we deployed our Go app to the App Engine Standard Environment. But now let’s see how easy it is to deploy to the Flexible Environment.</p><p>Remember our app.yaml file? Let’s change one word in line three:</p><pre>runtime: go<br>api_version: go1<br>env: flex<br>handlers:<br>- url: /.*<br>  script: _go_app</pre><p>Can you spot the difference? We changed env: standard to env: flex</p><p>Now simply re-run gcloud app deploy and hit Y again to confirm. Since we are deploying to the Flex Environment, this will take a bit longer (on the order of 3–5 minutes).</p><p>There’s different advantages for each environment, and I won’t discuss them here. However, if you want to look into it, there is a quick guide here on <a href="https://cloud.google.com/appengine/docs/the-appengine-environments">Choosing an App Engine Environment</a>.</p><h3>👋 ✌️</h3><p>Thanks for reading! If you have any questions, comment below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdd446967e6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Texternetes]]></title>
            <link>https://medium.com/@campionfellin/introducing-texternetes-7962004d3749?source=rss-3bea2b6f4f4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7962004d3749</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[twilio]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Campion]]></dc:creator>
            <pubDate>Wed, 28 Mar 2018 16:12:22 GMT</pubDate>
            <atom:updated>2018-03-28T16:12:22.273Z</atom:updated>
            <content:encoded><![CDATA[<h4>Control Your k8s Cluster Using SMS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*jkELS-VfC9fW2qYxfu3Oww.png" /><figcaption>t8s</figcaption></figure><p>This is a quick description of what I made at <a href="http://hacktech.io/">Hacktech</a> this year!</p><h3>What is Texternetes?</h3><p>Texternetes, known more affectionately as t8s is a Twilio-based SMS controller for your k8s cluster! In addition to this, t8s helps you provision and spin up a k8s cluster with an interactive interface.</p><h3>So How Does t8s Work?</h3><p>There’s two parts really:</p><ol><li>The t8s CLI that helps you deploy a cluster</li><li>The server that allows you to control the cluster with your phone</li></ol><p>So I’ll go ahead and give a brief overview of these parts separately. If you want to skip to the code you can find it on <a href="https://github.com/campionfellin/hacktech-t8s">Github</a>.</p><h3>Part 1: The t8s CLI</h3><p>The best part of the t8s CLI is the t8s init function. Run it and you’ll see:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23y5FCeEq9lLViBpY9nSSw.png" /><figcaption>t8s init</figcaption></figure><p>It will guide you through the process of choosing your type of app, your cloud provider, the size of your cluster, etc…</p><p>Once you go through that, your app will be automatically deployed to a Kubernetes cluster in the cloud!</p><p>There’s a few other commands as well:</p><h4>t8s just update</h4><pre>t8s just update &lt;project-name (in GCP)&gt; &lt;app-name&gt;</pre><p>This will re-deploy your app with whatever updates you have made recently.</p><h4>t8s just scale</h4><pre>t8s just scale &lt;project-name (in GCP)&gt; &lt;app-name&gt; &lt;number of pods you want&gt;</pre><p>This scales your app to however many pods you specify at the end of the command.</p><h4>t8s just rollback please</h4><pre>t8s just rollback please</pre><p>This will rollback your app to the latest working version. You must say please, or you’ll get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1R6lwByvvzm4fzklakH5Lw.gif" /></figure><p>So be nice to t8s so it will be nice to you!</p><h3>Part 2: The SMS Server</h3><p>In the <a href="https://github.com/campionfellin/hacktech-t8s">Github</a> repo for t8s you should see a folder labeled twilio-server with an app.js file and a package.json file. You can use these, along with ngrok to start a local server on your machine.</p><p>Next, go ahead and set this server as the web-hook for incoming SMS on your Twilio account. I won’t go into a lot of detail on how to do that here, but you can check out a guide <a href="https://cloud.google.com/appengine/docs/flexible/nodejs/using-sms-and-voice-services-via-twilio">here</a>.</p><h3>Let’s Go!</h3><p>Now that you have everything set up. Run t8s init to initialize your Kubernetes cluster. Once you have done that and set up your SMS server, you should be able to control your cluster by texting your Twilio number.</p><h3>Questions?</h3><p>If you have any questions about how to get this set up, check out the README on Github <a href="https://github.com/campionfellin/hacktech-t8s">here</a>. If you are still confused, drop a comment below!</p><p>Thanks for reading! Any comments or questions are appreciated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7962004d3749" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>