GithubHelp home page GithubHelp logo

rpi-conf's Introduction

rpi-conf

This fabric script helps to configure and deploy web projects on a Raspberry Pi 2

Usage

Installation

We suppose that you have a clean Raspbian installed in your (micro-)SD card, and you should have already expended the file system.

Also, your Raspberry pi should be in the same network as your local machine so that you can access it via SSH. Then run this script on your own machine, so that it will deploy configuration files on your Raspberry.

Dependencies:

$> pip install fabric

Clone the project on your local machine, go into the project directory and you are ready to go:

$> git clone https://github.com/yuancheng2013/rpi-conf.git
$> cd rpi-conf

Configure hotspot

Run the following command, then reboot your Raspberry. You should see a new Hotspot created with a name started with FONDATION_ORANGE, followed by seven characters that identify your server. Replace the RASPBERRY_IP with it's real IP in your sub network.

$> fab config_hotspot:host=pi@RASPBERRY_IP

If you want to change this name, modify the SSID_PREFIX in sysconf/etc/rc.local and re-run the command above.

Install some common packages

$> fab install_common:host=pi@RASPBERRY_IP

Deploy Edupi

$> fab deploy_edupi:host=pi@RASPBERRY_IP

By default, the command above will install current master branch on your Raspberry, which is actually in development mode.

If you want to install a production version (or any other version), you can get the commit SHA1 code from Github, and append to the command.

For example, 912349ef198f8f95d9d75073da3ecf981a95c61c is a commit for v1.1.0. You can install it by running:

$> fab deploy_edupi:host=pi@RASPBERRY_IP,commit=912349ef198f8f95d9d75073da3ecf981a95c61c

After that, you need to reboot your raspberry for the first time. EduPi will run automatically after boot.

Connect a mobile device to the Pi's Hotspot, open a browser and enter the URL: http://edupi.fondationorange.org:8021 to enter into the index page.

If you want to test it with your local machine which not only share the same network with your raspberry but also has access to the outside Internet, you need to change your hosts file. On Linux, add the following line to /etc/hosts:

RASPBERRY_IP fondationorange.org edupi.fondationorange.org

You can then use your browser to test it:

Normal user   : http://edupi.fondationorange.org:8021/
Administrator : http://edupi.fondationorange.org:8021/custom/

There is a default super user account created with this deployment script:

user: pi
password: raspberry

Of cause, this can be changed in the script fabfile.py.

rpi-conf's People

Contributors

yuancheng-p 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.