Skip to content

tets #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 44 commits into
base: hello
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
927aeba
start cli functionality
bpmct Mar 27, 2021
3a8560b
working cli and subprocesses
bpmct Mar 28, 2021
6bc1a86
fix google cloud check
bpmct Mar 28, 2021
a12e5b4
fix again whoopsies
bpmct Mar 28, 2021
1a96eef
better cloud shell checks
bpmct Mar 28, 2021
0e529b2
create cluster and scripts for users
bpmct Mar 29, 2021
089d1ca
start auto cloudflare stuff
bpmct Mar 29, 2021
8bbea9e
full launch capabilities
bpmct Mar 29, 2021
eab6a38
remove old stuff
bpmct Mar 29, 2021
d79d841
remove more old stuff
bpmct Mar 29, 2021
16ae013
install axios
bpmct Mar 29, 2021
31d5fc4
admin password stuff :)
bpmct Mar 29, 2021
a9a89cf
potentially allow installing from IP
bpmct Mar 29, 2021
677c2f1
add readme
bpmct Mar 29, 2021
47c3a6d
format readme
bpmct Mar 29, 2021
c0b026a
publicize
bpmct Mar 29, 2021
dbc0436
add readme and package info
bpmct Mar 29, 2021
2979360
upgrade
bpmct Mar 29, 2021
226d11c
bring readme to root level and re release
bpmct Mar 29, 2021
090fc3f
add ci
bpmct Mar 29, 2021
076d60a
improve formatting
bpmct Mar 29, 2021
e909688
Merge branch 'master' of github.com:bpmct/auto-coder into master
bpmct Mar 29, 2021
e5047bf
do not test
bpmct Mar 29, 2021
ea61cde
fix bad filename
bpmct Mar 29, 2021
7e933ab
fix ip-based install
bpmct Mar 29, 2021
fe757e7
fix formatting from cloud shell dev
bpmct Mar 29, 2021
eec5e1b
more info about cloud shell
bpmct Mar 29, 2021
b35b884
bump
bpmct Mar 29, 2021
f99084e
add troubleshooting
bpmct Mar 29, 2021
7147f95
fix formatting
bpmct Mar 29, 2021
b475f6e
remove silly debug ending
bpmct Mar 29, 2021
3d6c5a9
Merge branch 'master' of github.com:bpmct/auto-coder into master
bpmct Mar 29, 2021
4ec2e7a
add brand new account info
bpmct Mar 29, 2021
325d44c
update warning
bpmct Mar 29, 2021
82ee65b
add vs code settings
bpmct Mar 31, 2021
2d39126
enable k8s service
bpmct Mar 31, 2021
81a7b31
Merge branch 'master' of github.com:bpmct/auto-coder into master
bpmct Mar 31, 2021
2792703
remove k8s enable step
bpmct Mar 31, 2021
f47a0a8
fix checker
bpmct Apr 1, 2021
964b0c9
fix version
bpmct Apr 1, 2021
b173904
fix: README typo
ericpaulsen Apr 1, 2021
45bc12d
Merge pull request #5 from bpmct/ericpaulsen/fixtypo
ericpaulsen Apr 1, 2021
e169853
clarify "install"
bpmct Apr 5, 2021
178abc5
add 1.21 warning
bpmct Sep 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
your_*.yaml
.env
.env
out
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"esbenp.prettier-vscode"
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# launch-coder

⚠️: This was a hackathon project and is not recommended for production deployments or in sensitive environments.

This does not work for Coder v1.21+. Specify a --version flag

---

Launch [Coder](https://coder.com) in a simple way. It can:

- Create the recommended Google Cloud Cluster for you
- Install Coder with an automatic domain name: `[yourname].coding.pics`

Preferred environment: Google Cloud Shell. It just works.

## How to use

No need to install the CLI tool locally, run from NPM:

```sh
# For a guided install:
npx @bpmct/launch-coder

# See all commands:
npx @bpmct/launch-coder --help
```

## Install on your machine

```sh

npm i -g launch-coder

launch-coder

```

launch-coder will not install or provision anything without your permission :)

## Troubleshooting

On non-public Dev URLs: `An internal server error occurred`:

- This is an error I get frequently with Dev URLs, GKE, and CloudFlare domains, and it always seems to go away.
- Re-create Dev URL
- Re create environment
- Wait patiently
- Last resort: Make Dev URL public

---

Questions? Join Slack [https://cdr.co/join-community](https://cdr.co/join-community)
4 changes: 4 additions & 0 deletions bin/launch-coder
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node

require = require("esm")(module /*, options*/);
require("../src/cli").cli(process.argv);
17 changes: 17 additions & 0 deletions config-store/update-coder-no-domain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# allow namespace creation to fail, assume it already exists
kubectl create namespace INJECT_NAMESPACE || true

# set context to the namespace
kubectl config set-context --current --namespace=INJECT_NAMESPACE

# add/update the coder helm chart
helm repo update
helm repo add coder https://helm.coder.com

# install/upgrade coder (warning: this will ignore any manually-set values)
helm upgrade --namespace INJECT_NAMESPACE --install --atomic --wait coder coder/coder

# kind of lazy. sleep to make sure everything is ready for the CLI to continue
sleep 10
20 changes: 20 additions & 0 deletions config-store/update-coder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

# allow namespace creation to fail, assume it already exists
kubectl create namespace INJECT_NAMESPACE || true

# set context to the namespace
kubectl config set-context --current --namespace=INJECT_NAMESPACE

# add our issuer
kubectl apply -f INJECT_SAVEDIR/issuer.yaml

# add/update the coder helm chart
helm repo update
helm repo add coder https://helm.coder.com

# install/upgrade coder (warning: this will ignore any manually-set values outside of INJECT_SAVEDIR/values.yaml)
helm upgrade --namespace INJECT_NAMESPACE --install --atomic --wait coder coder/coder --values INJECT_SAVEDIR/values.yaml

# kind of lazy. sleep to make sure everything is ready for the CLI to continue
sleep 10
36 changes: 0 additions & 36 deletions domain_config.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions domains.md

This file was deleted.

36 changes: 0 additions & 36 deletions helm_config.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions index.js

This file was deleted.

1 change: 0 additions & 1 deletion kubesail/update.sh

This file was deleted.

11 changes: 0 additions & 11 deletions kubesail/values.yaml

This file was deleted.

Loading