https://github.com/cblavier/vscode-ansible
Ansible playbook for a cloud based VScode server (Elixir + JS)
https://github.com/cblavier/vscode-ansible
Last synced: 10 months ago
JSON representation
Ansible playbook for a cloud based VScode server (Elixir + JS)
- Host: GitHub
- URL: https://github.com/cblavier/vscode-ansible
- Owner: cblavier
- Created: 2020-04-27T10:34:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-08T14:32:16.000Z (over 5 years ago)
- Last Synced: 2025-04-05T01:44:27.948Z (over 1 year ago)
- Homepage:
- Size: 37.1 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Motivations
I wanted a seamless way to switch between devices while coding (macbookpro / imac / ipad).
- [VSCode offers a remote SSH](https://code.visualstudio.com/docs/remote/ssh) feature which allows your local VScode editor to remotely edit code, run terminals ... which is perfect
for computers.
- [coder.com](http://coder.com) also offers a feature to make a full featured VSCode environment run in your browser or as a PWA (which can be helpful from an iPad)
# Components
This project will help at setting up a ubuntu VPS with :
- Docker
- code-server
- elixir (with asdf)
- chromedriver
- node (with nvm)
- postgresql
- nginx as a reverse proxy in front of code-server, webpack and your project
- various shell things such as ohmyzsh, autojump, tmux or direnv
# Setup
Guidelines to provision a development server with Ansible
- first, provision a VPS from any cloud vendor (I use a Digital Ocean $40/mo VPS with Ubuntu 18.04)
- make sure you can root ssh to your newly created VPS
- register following domain names all set with `A record` to your VPS IP
- `ssh.mydomain.com` used by you or ansible to ssh to your VPS
- `vscode.mydomain.com` to access code-server web interface
- `webpack.mydomain.com` to reach webpack dev server, that will hot render assets
- `myproject.mydomain.com` to reach your dev server
- locally install ansible: `brew install ansible`.
- create an ansible config file in `~/.ansible.cfg`.
```
[defaults]
inventory = ~/.ansible/hosts
```
- create an ansible inventory in `~/.ansible/hosts` - create an ansible inventory in `~/.ansible/hosts`.
```
ssh.mydomain.com
```
- copy `variables/all.template.yml` to `variables/all.yml` and change variables to your convenience.
- run `ansible-playbook playbook.yml`.