chromeos-dev-setup icon indicating copy to clipboard operation
chromeos-dev-setup copied to clipboard

A script to automate installing good software for programming on Chrome OS

Developer setup for programming on Chrome OS

This setup script for installing Ubuntu core on Crouton for working on more powerful x86 Chrome OS devices. It is compatible with C9.io so the same environment can be created on or off your hardware. It can use Dropbox to sync your IDE settings and work in progress, and includes browser based media and torrent clients.

All of the software installed uses web or CLI interfaces so the 'chroot' doesn't install a GUI, if you want to also install an interface and desktop software change core to xfce when running crouton.

This script is public domain and may be used or modified in any way.

Pull requests

If you would like to add something please submit a pull request with your addition, it must include an updated README and a screenshot etc where applicable. Improvements to the setup script are welcome.

Running the setup

To use this you'll need crouton and developer mode ready.

$ sudo sh ~/Downloads/crouton -r trusty -t core -n my_chroot_name
$ sudo enter-chroot
$ sudo apt-get install -y curl
$ curl https://raw.githubusercontent.com/benlowry/chromeos-dev-setup/releases/setup.sh > setup.sh

# install everything
$ bash setup.sh

# install only these things
$ bash setup.sh nodejs cloud9 awscli

# install everything except
$ bash setup.sh -deluge -s3cmd -awscli -doctl -dropbox

# backup a configured machine
$ sudo edit-chroot -b my_chroot_name -f /media/removable/SD\ Card/

# restore a backup
$ sudo edit-chroot -r my_chroot_name -f /media/removable/SD\ Card/

What can be installed

Browser-based software

Languages

Tools

Hosting services

After setup finishes

If installed, note that On C9.io you use your workspace URL not localhost:

  • Cloud9 will be running at localhost:8080 ~/projects as workspace
  • PGWeb will be running at localhost:8081
  • Git WebUI runs at localhost:8082 after git webui in a repo
  • redis-commander runs at localhost:8083
  • Emby will be running at localhost:8096
  • Deluge will be running at localhost:8112, password 'deluge'
  • Dropbox requires connecting your account
  • PostgreSQL on port 5432 will be waiting to create databases and users
  • Redis on port 6379 will be waiting for final setup cd ~/redis-stable/utils && sudo bash install_server.sh

Screenshots

Finishing PostgreSQL setup

You will need to create a user and database:

$ sudo -i -u postgres
$ createuser -P -s -e mydb
$ createdb mydb --owner mydb

Finishing Redis setup

Redis requires running an installation script to configure the port and folders:

$ cd ~/redis-stable/utils && sudo bash install_server.sh

Finishing Dropbox setup

First run it will generate a URL to link your computer:

$ ~/.dropbox-dist/dropboxd

Once you have followed the URL press ctrl+c to quit; and:

$ ~/dropbox.py start 

# exclude folders via selective sync, dropbox will erase any
# files that become excluded  
$ ~/dropbox.py exclude add my_folder

# exclude all folders but 'chromedev' (only affects folders already syncing)
$ cd ~/Dropbox && for x in *; do if [ ! "$x" = "chromedev" ]; then ~/dropbox.py exclude add "$x"; fi done;

# replace ~/projects with ~/Dropbox/chromedev:
$ rm -rf ~/projects && ln -s ~/Dropbox/chromedev ~/projects