Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist/
/hypeman
.env
hypeman/**
bin/hypeman
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-da3f4038bb544acae375f44527f515dc58308f67822905258b155192041e65ed.yml
openapi_spec_hash: 4c7f6f453c20eda7fd8689e8917c65f9
config_hash: a7d0557c72de54fd6baded5b189777c3
configured_endpoints: 24
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-51c1f6c7e28113c00cfcfea0595de40961dca2263b88bf2e47ef46b8ed458b07.yml
openapi_spec_hash: 07f24b9c8f0b757100655ac10d83b362
config_hash: 510018ffa6ad6a17875954f66fe69598
89 changes: 78 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,88 @@ go run cmd/hypeman/main.go
# Pull an image
hypeman pull nginx:alpine

# Run an instance (auto-pulls image if needed)
hypeman run nginx:alpine
hypeman run --name my-app -e PORT=3000 nginx:alpine
# Boot a new VM (auto-pulls image if needed)
hypeman run --name my-app nginx:alpine

# List running instances
# List running VMs
hypeman ps
hypeman ps -a # show all instances
# show all VMs
hypeman ps -a

# View logs of your app
# All commands support using VM name, ID, or partial ID
hypeman logs my-app
hypeman logs -f my-app

# Execute a command in a running VM
hypeman exec my-app whoami
# Shell into the VM
hypeman exec -it my-app /bin/sh

# VM lifecycle
# Turn off the VM
hypeman stop my-app
# Boot the VM that was turned off
hypeman start my-app
# Put the VM to sleep (paused)
hypeman standby my-app
# Awaken the VM (resumed)
hypeman restore my-app

# Create a reverse proxy ("ingress") from the host to your VM
hypeman ingress create --name my-ingress my-app --hostname my-nginx-app --port 80 --host-port 8081

# List ingresses
hypeman ingress list

# Curl nginx through your ingress
curl --header "Host: my-nginx-app" http://127.0.0.1:8081

# Delete an ingress
hypeman ingress delete my-ingress

# Delete all VMs
hypeman rm --force --all
```

More ingress features:
- Automatic certs
- Subdomain-based routing

```bash
# Make your VM if not already present
hypeman run --name my-app nginx:alpine

# This requires configuring the Hypeman server with DNS credentials
# Change --hostname to a domain you own
hypeman ingress create --name my-tls-ingress my-app --hostname hello.hypeman-development.com -p 80 --host-port 7443 --tls

# Curl through your TLS-terminating reverse proxy configuration
curl \
--resolve hello.hypeman-development.com:7443:127.0.0.1 \
https://hello.hypeman-development.com:7443

# View logs
hypeman logs <instance-id>
hypeman logs -f <instance-id> # follow logs
# OR... Ingress also supports subdomain-based routing
hypeman ingress create --name my-tls-subdomain-ingress '{instance}' --hostname '{instance}.hypeman-development.com' -p 80 --host-port 8443 --tls

# Execute a command in a running instance
hypeman exec <instance-id> -- /bin/sh
hypeman exec -it <instance-id> # interactive shell
# Curling through the subdomain-based routing
curl \
--resolve my-app.hypeman-development.com:8443:127.0.0.1 \
https://my-app.hypeman-development.com:8443

# Delete all ingress
hypeman ingress delete --all
```

More logging features:
- Cloud Hypervisor logs
- Hypeman operational logs

```bash
# View Cloud Hypervisor logs for your VM
hypeman logs --source vmm my-app
# View Hypeman logs for your VM
hypeman logs --source hypeman my-app
```

For details about specific commands, use the `--help` flag.
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ require (
github.com/gorilla/websocket v1.5.3
github.com/itchyny/json2yaml v0.1.4
github.com/muesli/reflow v0.3.0
github.com/onkernel/hypeman-go v0.5.0
github.com/onkernel/hypeman-go v0.7.0
github.com/tidwall/gjson v1.18.0
github.com/tidwall/pretty v1.2.1
github.com/tidwall/sjson v1.2.5
github.com/urfave/cli-docs/v3 v3.0.0-alpha6
github.com/urfave/cli/v3 v3.3.2
golang.org/x/term v0.37.0
Expand Down Expand Up @@ -60,6 +59,7 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/vbatts/tar-split v0.12.2 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/onkernel/hypeman-go v0.5.0 h1:ILe+n18aN5MXx0ARxDJ/ZYqcX2MdfJqWrE4sn14gJ5I=
github.com/onkernel/hypeman-go v0.5.0/go.mod h1:BPT1yh0gbby1E+As/xLM3GVjw7752+2C5SaEiJV9rRc=
github.com/onkernel/hypeman-go v0.7.0 h1:KUeY4VGJtStA4+zkPtx7eDCO3rSznbIVoj4U6l+g50Q=
github.com/onkernel/hypeman-go v0.7.0/go.mod h1:BPT1yh0gbby1E+As/xLM3GVjw7752+2C5SaEiJV9rRc=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
Expand Down
7 changes: 7 additions & 0 deletions pkg/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ func init() {
&psCmd,
&logsCmd,
&rmCmd,
&stopCmd,
&startCmd,
&standbyCmd,
&restoreCmd,
&ingressCmd,
{
Name: "health",
Category: "API RESOURCE",
Expand Down Expand Up @@ -101,6 +106,8 @@ func init() {
&instancesLogs,
&instancesDelete,
&instancesStandby,
&instancesStart,
&instancesStop,
},
},
{
Expand Down
Loading