Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Everything Serverless with Google Cloud Run

Everything Serverless with Google Cloud Run

A lot of developers/engineers fail to understand the platforms that are right for their products or services. Perhaps, engineers feel that Google cloud compute is cool, so it is probably the way they should go or maybe Kubernetes is shiny, they should probably use it but the questions are,
Are you ready to scale?
Do you have intentions to grow fast?
Is this the right approach?
Is it just a portfolio website?

Understanding that we don't need to over-engineer our infrastructure is key. Know what you need and what should be deployed. This talk is trying to buttress a point on how you can get a fully functional app or service using the right infrastructure, get to understand the power of the cloud that hasn't been touched yet and know that it can be better than what we thought.

Obinna Odirionye

November 16, 2019
Tweet

More Decks by Obinna Odirionye

Other Decks in Technology

Transcript

  1. Topic:
    Everything Serverless with
    Google Cloud Run
    @odirionyeo
    E
    OBINNA ODIRIONYE | DEVFESTUYO 2019

    View Slide

  2. OBINNA ODIRIONYE.
    Student Partner, Microsoft.
    Campus Ambassador, Ingressive.
    DevOps Engineer, Deimos.

    View Slide

  3. View Slide

  4. “Serverless computing is a paradigm
    shift in application development that
    enables developers to focus on writing
    code without worrying about
    infrastructure.” - Google Cloud
    What is serverless?
    “Serverless computing enables
    developers to build applications faster
    by eliminating the need for them to
    manage infrastructure.” - Microsoft
    Azure

    View Slide

  5. “FaaS is a serverless backend service allowing
    developers to write modular pieces of code on the
    fly that can be executed in response to certain
    events” - Cloudflare.
    Such examples are sending mails, payment processing, uploading
    file to Google cloud Storage, Posting a tweet and many more.
    Serverless: FUNCTIONS-AS-A-SERVICE

    View Slide

  6. “FaaS is a serverless backend service allowing
    developers to write modular pieces of code on
    the fly that can be executed in response to
    certain events” - Cloudflare.
    Such examples are sending mails, payment
    processing, uploading file to Google cloud
    Storage, Posting a tweet and many more.
    Serverless: FUNCTIONS-AS-A-SERVICE
    Serverless/FaaS architecture.

    View Slide

  7. Google trends: What does the statistics say over the last
    five years about serverless?

    View Slide

  8. Serverless Cloud Providers(FAAS):
    1. Google Cloud
    2. Microsoft
    3. Amazon Web Services
    4. IBM
    5. Netlify
    6. Zeit
    7. Cloudflare
    8. Alibaba Cloud
    9. Apache and more...

    View Slide

  9. Advantages:
    ● No Server Management.
    ● Pay for what you use, reducing cost
    ● Auto scaling.
    ● Fast Deployments and updates.
    Deeper Dive into Serverless Computing
    Disadvantages:
    ● Testing and debugging is hard
    ● Performance becomes an issue, Cold
    boots.
    ● Not built for long processes.
    ● Vendor lock-in a risk. Hint: Use
    Serverless framework.

    View Slide

  10. “Serverless framework is a
    cross-platform, free and web
    open-source framework which allows
    developers to deploy functions to FaaS
    providers.”
    What is the Serverless Framework?
    Supported FaaS Providers(Framework):
    ● AWS Lambda
    ● Microsoft Azure functions
    ● Kubeless
    ● Google Cloud functions
    ● Cloudflare workers
    ● Alibaba Cloud Functions
    ● Apache Openwhisk

    View Slide

  11. THE PROBLEMS OF FUNCTIONS:
    ● Unconventional way of writing/deploy apps
    Microsoft Azure Functions config
    Netlify functions config

    View Slide

  12. Zeit Now config Cloudflare workers
    Firebase functions config

    View Slide

  13. Google Cloud functions:
    ● Node.js 8 -10
    ● Go 1.11
    ● Python 3.71
    MORE PROBLEMS:
    Limited Multiple Language Runtimes:
    Microsoft Azure functions:
    ● Node.js 8 -10
    ● C#
    ● F#
    ● Bash
    ● PHP(Experimental)

    View Slide

  14. KEY QUESTIONS:
    ● What happens to your app when no runtime is available?
    ● What happens when developers want to deploy apps using
    latest versions of their runtime like Node.js v12 ?
    ● How long do I have wait for my runtime to be released?
    ● Does this mean containers are finally going to die?
    And more...

    View Slide

  15. Developer: Hay God! What sort of compound complex
    problem is this?

    View Slide

  16. Google trends: What does the statistics say over the last
    five years about serverless and containers?

    View Slide

  17. “Serverless has evolved
    beyond FaaS...” - Kelsey
    Hightower,
    Developer Advocate at
    Google Cloud

    View Slide

  18. Serverless + Containers = Google Cloud Run
    CONTAINERS AS A SERVICE
    A SOLUTION AT LAST!

    View Slide

  19. How containers will be feeling like right now

    View Slide

  20. “Containers finally solves the
    compound complex
    problems of functions” -
    Obinna Odirionye.

    View Slide

  21. Serverless + Containers(CAAS):
    ● Developers can ship their products
    and tools with their favorite choice of
    language(PHP, Kotlin, Java, Ruby, etc)
    ● No more Vendor lock-in problems.
    ● Custom Domain with autoSSL.
    ● Openness to Business Logic.
    ● There’s no need to know Kubernetes.

    View Slide

  22. Developers: Obinna, Your talk talk is too much, how do we
    deploy?

    View Slide

  23. Prerequisites: Docker, Basic Knowledge of Containers.
    Steps:
    1. Build your Docker image of your app. [docker build --rm -f "Dockerfile" -t *name of app*
    /path/to/your/app]
    2. Tag your Docker image to the Google Cloud Container Registry [docker tag *name of the built
    image* us.gcr.io/[PROJECT ID]/*name of the built image*]
    3. Push the tagged image to Google Cloud [docker push us.gcr.io/[PROJECT_ID]/*name of the built
    image*].
    4. Deploy to Cloud Run from your Google Cloud Console. *Here’s a link: Google cloud Run Docs*
    Packaging and Deployment(CLI)

    View Slide

  24. That’s all. Start moving those apps to Serverless.

    View Slide

  25. Before using Serverless. After using Serverless.

    View Slide

  26. Thank You!
    Reach me on twitter via odirionyeo and check out my work on
    Github via nerdeveloper.

    View Slide

  27. View Slide