Giter Club home page Giter Club logo

rancherbook-samples's Introduction

テストを体験してみる

本資料は、 https://github.com/thinkitcojp/RancherBook-samples をフォークしたものです。

ベースとしては、 RancherによるKubernetes活用完全ガイド ThinkIT Books のサンプルコードを改修したものになります。

前提環境

本リポジトリは以下の環境で動作確認をしています。

  • docker desktop 2.2.0.5 (for macOS)
    • docker-ce 19.03.8
  • docker-compose 1.25.4

アプリケーションの内容

タスク管理のAPIを備えたサーバサイドアプリケーション(serverディレクトリ配下)、 それにアクセスするためのCLIアプリケーション(clientディレクトリ配下)を作成しています。

サーバサイドアプリケーション

Djangoおよび、Django REST frameworkを 使ったタスク管理アプリケーションです。

クライアントサイドアプリケーション

cobraを使って作成したCLIアプリケーションです。 サーバサイドアプリケーションにアクセスするためのクライアントを準備しています。

実行方法

基本的には、docker-composeを使って実行することを前提としています。 クライアントサイドのテストを実行する際は以下のような手順で実行します。

$ docker-compose up --build --abort-on-container-exit --exit-code-from todo-client

WARNING: The TODO_TESTSERVER variable is not set. Defaulting to a blank string.
Building todo-client
Step 1/5 : FROM golang:1.11 as builder
 ---> 43a154fee764
〜〜省略〜〜
todo-client_1  | 21     updated RUNNING updated description
todo-client_1  | 2020/04/13 09:57:34 Task(ID=21) is updated.
todo-client_1  | 2020/04/13 09:57:34 Task(ID=21) is updated.
rancherbook-samples_todo-client_1 exited with code 0
Aborting on container exit...
Stopping rancherbook-samples_todo-mysql_1  ... done
Stopping rancherbook-samples_todo-server_1 ... done

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.