Giter Site home page Giter Site logo

news-portal-with-iac's Introduction

Development and operations tools manual setup

You need all the tools below installed locally:

Prerequisites to build the Java applications

  • make
  • Java
  • Leiningen (can be installed using brew install leiningen)

Prerequisites for running infrastructure code

  • make
  • docker daemon
  • terraform
  • ssh-keygen
  • gcloud cli

Infrastructure setup

This is a multi-step guide to setup some base infrastructure, and then, on top of it, the test environment for the newsfeed application.

Base infrastructure setup

With an assumption that we have a new, empty GCP account, we need to provision some base infrastructure just one time. These steps will provision:

  • terraform backend in GCS bucket
  • a minimal VPC with 1 subnet
  • GCR repositories for docker images

Build the application artifacts

If you haven't built the jars and static resources yet, you should do so now:

make _apps

Build docker images

Artifacts from previous stage will be packaged into docker images, then pushed to ECR.

Each application has its own image. Individual image can be built with:

make <app-name>.docker
# for example:
make front-end.docker

But you can build all images at once with

make docker

Push docker images

Before applications can be deployed on GCP, the docker images have to be pushed:

make _push

Provision services

Then, we can provision the backend and front-end services:

make _news.infra

Terraform will print the output with URL of the front_end server, e.g.

Outputs:

frontend_url = http://34.244.219.156:8080

Delete services

To delete the deployment provisioned by terraform, run following commands:

make _news.deinfra

news-portal-with-iac's People

Contributors

stambuk-cl avatar

Stargazers

 avatar

Watchers

 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.