Giter VIP home page Giter VIP logo

hyunuk / emblem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/emblem

0.0 0.0 0.0 3.43 MB

:diamond_shape_with_a_dot_inside:Emblem Giving is a sample application that demonstrates a serverless architecture with continuous delivery, and trouble recovery.

License: Apache License 2.0

Shell 17.09% JavaScript 20.06% Python 32.23% CSS 1.73% HTML 11.47% HCL 15.60% Dockerfile 1.82%

emblem's Introduction

๐Ÿ’  Emblem Giving

Emblem Giving is a sample application intended to demonstrate a complex, end-to-end serverless architecture. It showcases serverless continuous delivery as a donation sample app hosted on Google Cloud.

This sample application is for learning purposes only. Real financial transactions are not made. The giving campaigns in the app are not real.

Features

This project features:

  • 2-tier web application architecture with Cloud Run
  • continuous delivery with Cloud Build
  • Terraform deployment
  • Example configuration and usage of the following Google services and apis:
    • Cloud Run
    • IAM
    • Secret Manager
    • Cloud Storage
    • Cloud Firestore
    • Cloud Build
    • Artifact Registry
    • Pub/Sub

Go deeper into project details in the documentation or read through the technical decisions that got us where we are today.

Service architecture

Emblem architecture diagram

Project Status

  • Release Stage: Alpha
  • Self-service / Independent Setup: Follow the instructions to set up Emblem in the Getting Started section below.

Contributing

Getting Started

Emblem is made of a combination of resources created and managed by Terraform and resources created via the Google Cloud CLI or Google Cloud Console. You may deploy Emblem by running setup.sh (see streamlined setup instructions).

Prerequisites

To deploy Emblem, you will need:

  • 3 Google Cloud projects (ops, stage, prod) with billing enabled on each
  • A fork of this repo

The machine that you will run the setup from will need the following installed:

We recommend running through setup steps using Google Cloud Shell, which has the required softare pre-installed. The following will open Cloud Shell Editor and clone this repo:

Open in Cloud Shell

Streamlined setup

  1. Connect a fork of this Github repo to your Emblem ops project

    Connect your repository to your Google Cloud Project via the Cloud Build triggers page in the Google Cloud Console. Make sure you are working from your ops project and make sure you select region "Global (non-regional)" when connecting your repo. This will require you to enable the Cloud Build API and authenticate with your Github account.

    gcloud services enable cloudbuild.googleapis.com
    

    Principals with access to your Google Cloud project will be able to create and run triggers on the repository you use.

  2. Set environment variables

    The streamlined setup uses setup.sh to deploy Emblem resources via Terraform and the gcloud CLI.

    Create three environment variables (PROD_PROJECT, STAGE_PROJECT, OPS_PROJECT) with their respective project id's.

    export PROD_PROJECT=<YOUR_PROD_PROJECT_ID>
    export STAGE_PROJECT=<YOUR_STAGE_PROJECT_ID>
    export OPS_PROJECT=<YOUR_OPS_PROJECT_ID>
    
  3. Execute setup.sh

    The setup will do the following:

    1. Create a GCS bucket that will be used to store remote Terraform state files
    2. Run terraform apply from each of the environment root directories in terraform/environments/
    3. Build and push content-api, web, and runner containers to the Artifact Registry repositories in your ops project
    4. Seed sample data into the Firestore instances in your staging and prod projects
    5. Deploy Cloud Run services for content-api and website in your stage and prod projects

    You will be prompted to enter the URL for the Github repository you added to your ops project in step 1. This will be used to deploy Cloud Build triggers for the CICD pipeline. To begin setup:

    ./setup.sh
    

    Once complete you will have a deployed instance of Emblem.

    To see which Google services and apis got installed in your projects, check out below:

    stateDiagram
        Operations --> Staging
        Operations --> Production
    
        state Operations {
          state "IAM" as a0
          state "Secret Manager" as a1
          state "Cloud Build" as a2
          state "Artifact Registry" as a3
          state "Cloud Firestore" as a4
          state "Cloud Scheduler" as a5
          state "Pub/Sub" as a6
        }
    
        state Staging {
          direction LR
          state "Cloud Firestore" as b0
          state "Cloud Storage" as b1
          state "Cloud Run" as b2
          state "Cloud Logging" as b3
        }
    
        state Production {
          direction LR
          state "Cloud Firestore" as c0
          state "Cloud Storage" as c1
          state "Cloud Run" as c2
          state "Cloud Logging" as c3
        }
    

This is not an official Google project.

emblem's People

Contributors

renovate-bot avatar grayside avatar rogerthatdev avatar pattishin avatar engelke avatar dinagraves avatar kelsk avatar dependabot[bot] avatar iennae avatar averikitsch avatar muncus avatar raffomartini avatar mco-gh avatar matyifkbt avatar smeet07 avatar anguillanneuf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.