Deploy code-server
to Google Cloud Shell.
ansible-playbook -i inventory.yaml couscous.yaml
- Start
code-server
with the--link [optional name]
flag
code-server --link couscous
- Authorize with Github
- Click the link
The Live Share Extension enables developers to collaborate realtime from within VS Code.
Due to the closed-source nature of the VS Code Extension marketplace, code-server
is unable to connect to the actual VS Code Extension Marketplace. Only open source extensions are available in the extensions explorer; however, closed source extensions can still be manually installed via a .vsix
package.
The --enable-proposed-api
option does not seem to work, success was found by directly modifying the product.json
file.
Authentication for the Live Share extension can sometimes be unreliable. I have found it easier to use a "user code" for authentication which can be authorized at: https://insiders.liveshare.vsengsaas.visualstudio.com/auth/login
Cloud Shell is an online development and operations environment accessible from a browser. Cloud Shell conveniently creates a temporary development environment with 5GB of persistent disk storage.
Cloud Shell instances terminate after 20 minutes of inactivity. When using gcloud
to connect to Cloud Shell, the ServerAliveInterval
configuration can prolong the session.
gcloud cloud-shell ssh --authorize-session --ssh-flag="-o ServerAliveInterval=30"
There is no default password, it must be manually configured.
sudo passwd $USER
Persistent storage is limited to 5GB located at $HOME
. rclone
can be utilized to overcome this limitation.
sudo -s # switch to root
vim /etc/fuse.conf # change /etc/fuse.conf to allow_other
mkdir /mnt/cloudshell # create mounting point
chown $SUDO_USER:$SUDO_USER /mnt/cloudshell
exit # exit root
rclone --vfs-cache-mode full --cache-dir /tmp/rclone-cache -vv mount cloudshell: /mnt/cloudshell/ --allow-other
rclone
mounts are not perfect. Problems may frequently occur; for instance, this message frequently appears in vim
:
WARNING: The file has been changed since reading it!!! Do you really want to write to it (y/n)?
It may be possible to fix these problems by taking inspiration from this project. Which was found courtesy of this forum post.