GithubHelp home page GithubHelp logo

fagan2888 / cloud-build-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ternarydata/cloud-build-demo

0.0 0.0 0.0 30 KB

Code for a Google Cloud Build demo run at the SLC Python meetup

Python 96.35% Shell 2.99% Dockerfile 0.66%

cloud-build-demo's Introduction

Google Cloud Build Demo - SLC Python Meetup

Slides for this talk

Code

Code for a Google Cloud Build demo run at the SLC Python meetup. To experiment with these builds, create a GCP project and modify the cloudbuild.yaml files to point to your project. For example, in

steps:
- name: 'gcr.io/cloud-builders/docker'
  entrypoint: 'docker'
  args: [ 'build', '-t', 'gcr.io/slc-python-demo/airflow', '.' ]
images: ['gcr.io/slc-python-demo/airflow']

change slc-python-demo to your project id.

The easiest place to run these builds is in the Google Cloud Shell. There are four builds: airflow-install-and-test, build-airflow-container, test-from-airflow-container and pull-and-write-data. Change to the appropriate directory and run

gcloud builds submit

The file dag.py in two of the builds is taken from a standard tutorial in the Apache Airflow Project.

airflow-install-and-test

Pulls a Python 3.7 container from Docker Hub, installs Apache Airflow and runs a basic test.

build-airflow-container

Builds an Airflow container by pulling a Python 3.7 container and pip installing Airflow. Pushes the resulting container to the GCP project container registry.

test-from-airflow-container

Pulls the Airflow container built in build-airflow-container and runs a simple test.

pull-and-write-data

Not a true build - downloads AWS IP ranges, stores the data to a file, and pushes the file to a Cloud Storage bucket. You should create a target bucket in your project and update pull-data.sh.

cloud-build-demo's People

Contributors

mhousley 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.