Giter VIP home page Giter VIP logo

piaas's Introduction

The Personal IAAS

Piaas is a set of tools that help you develop using multiple machines. You can use your favorite IDE on your Macbook, while compile and serve on a more powerful desktop PC or cloud machine.

We all work on laptop today. However, compiling and serving on laptop is crazy. The fan keeps working and creating quite a noise. Your battery drained, cycle count increased. More than ever, peace of mind you lost.

Piaas help your workspace in sync with a remote machine, given it a more powerful desktop PC, an bare metal server or a cloud instance. Developing with your favorite IDE on your laptop, running your api server and database server from the cloud machine. Your laptop is therefore relaxed to do the thing that absolutely required it to do. Great team work, isn't it ?

Installation

Download the binary from the github release page:

  • Windows, 64 bit
  • Mac OS, 64 bit
  • Linux, 64 bit

Extract and place the binary in your path and you're done.

System requirements

The application support Mac OS, but was only tested on Mojave.

Linux should be fine, but wasn't tested in the real world.

On windows platform, WSL (windows subsystem linux) is required. At the moment Windows 10 is the only version with WSL so is the only version supported.

If you need instructions on how to enable WSL on windows, check this.

Getting started

  1. Make sure you have rsync. You can test it via a command line prompt.

  2. You need to allow your local user to access target account.

    This is usually done by adding your local public key to remote ~/.ssh/authorized_keys. Once set, use ssh $user@$target_address to make sure it actually works.

  3. Setup piaasconfig.yml and .piaasignore

Check sync document for more details

Commands

  • sync, Keep your local workspace in sync with a remote directory
  • app, Run your application in the background and monitor the logs

piaas's People

Contributors

sohoffice avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

piaas's Issues

piaas app run with -t flag did not run sbt task in the background.

If we defined a sbt task, and start it with piaas app run -t. The sbt command will connect to incorrect tty and wait indefinitely. However, if we omit the -t flag, the sbt command can successfully run in the background.

Maybe we should fork a child to run the task ? We could terminate the forked child right after the task was executed, and tail from the main process.

Not sure whether sbt is the sole instance of such issue

Run application in the background and redirect the logs to file.

Take Angular for example, using a remote machine to serve means we will have to run ng serve in the background. The process should not be terminated even if we closed the ssh session for whatever reason.

The application must redirect log to a file for issue investigation.

Move .piaas.d to home directory

.piaas.d, where pid and logs are kept, should be moved out of source directory for the following reasons:

  1. They are not exactly source codes.
  2. They may be wiped out by sync unless excluded in the ignore file.

Support rsync executable override per profile

I stumbled upon an interesting use case. I synced from my Macbook to a Windows VM. However, I find myself wanted to sync from this windows VM to a second location. The windows VM require wsl rsync to work, but my host doesn't. Obviously, a single executable section in the top-most level of piaasconfig.yml is not enough. The scenario looks like the below:

Host ---> Windows ---> 2nd Windows

It would be nice if we can override executable per profile.

Support remote shell override for rsync

rsync can benefit from an alternative remote shell, like for example using a control master ssh connection.

We should allow user to specify remoteShell under profiles > connection. This will be used as the -e parameter when invoking rsync. For example:

rsync -av -e '{{remoteShell}}' --exclude-from=.piaasignore --delete --copy-links . [email protected]:~/src

Control Master SSH Scenario:

  1. We could have opened a control master connection with ssh -nNf -o ControlMaster=yes -o ControlPath="$HOME/.ssh/.control-%L-%r@%h:%p" user@host
  2. Specify remoteShell as ssh -o 'ControlPath=$HOME/.ssh/control-%L-%r@%h:%p'
  3. The control master connection can be terminated with ssh -O exit -o ControlPath="$HOME/.ssh/.control-%L-%r@%h:%p" user@host

Use github releases to manage new release file

At the moment, we're publishing to gh-pages branch. But github has advised us to use releases.

Github releases involves calling REST API, which I don't feel reasonable to operate by hand. We should use command line tools like this

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.