Because:
- I work on a Chromebook (it's generally awesome, except for local development)
- Running a (premptable) big server for even 40 hours a month is much cheaper than buying a good dev workstation
- It forces me to make things as simple as possible, which means lower barriers to entry to anyone who wants to help.
This is not an official Google product.
GCE Ubuntu 16 comes with curl
and git
and bash
. If you don't have those, add them.
Preemptable instances habe ephemeral external IPs - the IP goes away when the instance is shut down.
To make it easier to use, use a dynamic DNS service - like DuckDNS (which is free).
To setup DuckDNS - get the Curl URL from your DuckDNS page, and put the hostname and the token in
/etc/duckdns.env
. It should look like this, but with your values:
DUCKDNS_HOSTNAME=myserver
DUCKDNS_TOKEN=01234567-89ab-cdef-0123-456789abcdef
Then set up the service:
sudo cp duckdns.service /etc/systemd/system
sudo systemctl enable duckdns.service
In case you want to check the IP from the machine itself:
curl http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip -H "Metadata-Flavor: Google"
Install the Docker repos and Docker, which are generally much more recent than the Ubuntu maintained docker.io package:
sudo apt-get -y install \
apt-transport-https \
ca-certificates;
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - ;
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable";
sudo apt-get update;
sudo apt-get -y install docker-ce;
sudo service docker restart;
Add your user to the docker group - makes life easyier:
sudo gpasswd -a ${USER} docker
Thin logout and log back in.
A script to just get the latest non-rc version of docker-compose:
./get-dc.sh
Because you're on GCE (just guessing...):
ssh-keygen -t rsa -C "${USER}@gmail.com" -b 4096
cat ~/.ssh/id_rsa.pub
Add the public SSH key to your code repo of choice.
Let git know who you are:
git config --global user.email "your-email-addresss-here"
git config --global user.name "your-name-here"
If you want to automatically shutdown the server instance so you're not charged for time you're not using:
sudo cp auto_shutdown /etc/init.d
cd /etc/rc3.d
sudo ln -s /etc/init.d/auto_shutdown S99auto_shutdown
dev-on-chromeos-gce-setup's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.