Code Monkey home page Code Monkey logo

example-picam's Introduction

example-picam

  1. pre-setup

    1. You finished to setup RDBOX(RDBOX-HQ, RDBOX and ROBOT with pi-camera)
    2. Labeled on your raspberry pi with pi-camera
      # e.g. hostname is 'PICAM01'
      $ sudo kubectl --kubeconfig /etc/kubernetes/admin.conf label node PICAM01 node.rdbox.com/type=picam
      
    3. Labele and make a photo directory on your k8s node
      # e.g. hostname is 'NODE01'
      $ sudo kubectl --kubeconfig /etc/kubernetes/admin.conf label node NODE01 node.rdbox.com/type=picam-data
      $ ssh -i YourKeyFile ubuntu@NODE01 sudo bash -c "mkdir -p /opt/picam_data/photo & chmod 777 /opt/picam_data/photo"
      
    4. You finished to setup cross-build environment. See. https://github.com/rdbox-intec/rdbox/wiki/tutorials-en#tutorials
  2. Login to docker hub. Set a environment variable 'HOCKERHUB_ACCOUNT' and login. This environment variable will be used later.

$ export HOCKERHUB_ACCOUNT="YourDockerHubAccount"
$ sudo docker login --username "${HOCKERHUB_ACCOUNT}"
  1. Clone a repository from github.
$ mkdir -p ${HOME}/git
$ cd ${HOME}/git
$ git clone https://github.com/higuchi-toshio-intec/example-picam
  1. Build some docker images and push.
$ cd ${HOME}/git/example-picam/dockerfiles
$ cd ros-raspbian
$ sudo docker build -t "ros-raspbian" .

$ cd ../pub_photo
$ sudo docker build -t "${HOCKERHUB_ACCOUNT}/picam_pub_photo" .
$ sudo docker push "${HOCKERHUB_ACCOUNT}/picam_pub_photo"

$ cd ../sub_photo
$ sudo docker build -t "${HOCKERHUB_ACCOUNT}/picam_sub_photo" .
$ sudo docker push "${HOCKERHUB_ACCOUNT}/picam_sub_photo"

$ cd ../view_photo
$ sudo docker build -t "${HOCKERHUB_ACCOUNT}/picam_view_photo" .
$ sudo docker push "${HOCKERHUB_ACCOUNT}/picam_view_photo"

  1. Login Kubernetes Dashboard on your RDBOX
    1. Create some YAML files for kubernetes resources.
      • ${HOME}/git/example-picam/kubernetes/picam-service-flask.sh
      • ${HOME}/git/example-picam/kubernetes/picam-app-pub-photo.sh
      • ${HOME}/git/example-picam/kubernetes/picam-app-sub-photo.sh
    2. Create a resource for service.
    3. Create a resource for photo publisher.
    4. Create a resource for photo subscriber and viewer.

example-picam's People

Contributors

higuchi-toshio-intec avatar

Watchers

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