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
2 changes: 1 addition & 1 deletion cmd/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"strings"

agentv1 "github.com/persys/compute-agent/pkg/api/v1"
agentv1 "github.com/persys-dev/persys-cloud/pkg/agent/api/v1"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

var metricsCmd = &cobra.Command{
Use: "metrics",
Short: "View Prow metrics",
Long: `Retrieves node and workload metrics from Prow.`,
Short: "View Persys Compute metrics",
Long: `Retrieves node and workload metrics from Persys Compute.`,
Run: func(cmd *cobra.Command, args []string) {
c, _, err := newClientWithTrace()
cobra.CheckErr(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.persys/config.yaml)")
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "enable verbose logging")

rootCmd.PersistentFlags().String("transport", "", "transport to use: http or grpc")
rootCmd.PersistentFlags().String("transport", "http", "transport to use: http or grpc")
rootCmd.PersistentFlags().String("grpc-endpoint", "", "gRPC endpoint, e.g. localhost:8085")
rootCmd.PersistentFlags().Bool("grpc-insecure", false, "use insecure gRPC transport (no TLS)")
rootCmd.PersistentFlags().String("grpc-target", "", "gRPC target service: scheduler or agent")
Expand Down
4 changes: 2 additions & 2 deletions cmd/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"strings"

controlv1 "github.com/persys-dev/persysctl/internal/controlv1"
agentv1 "github.com/persys/compute-agent/pkg/api/v1"
controlv1 "github.com/persys-dev/persys-cloud/pkg/scheduler/controlv1"
agentv1 "github.com/persys-dev/persys-cloud/pkg/agent/api/v1"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"time"

"github.com/persys-dev/persysctl/internal/config"
controlv1 "github.com/persys-dev/persysctl/internal/controlv1"
controlv1 "github.com/persys-dev/persys-cloud/pkg/scheduler/controlv1"
"github.com/persys-dev/persysctl/internal/models"
agentv1 "github.com/persys/compute-agent/pkg/api/v1"
agentv1 "github.com/persys-dev/persys-cloud/pkg/agent/api/v1"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/specs/celery-worker.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "python:3.11-alpine",
"image": "python:3.12-alpine",
"command": [
"sh", "-c", "python -m pip install --no-cache-dir celery redis && celery -A tasks worker --loglevel=info"
],
Expand Down
21 changes: 6 additions & 15 deletions examples/specs/vm-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,12 @@
"memory_mb": 2048,
"disks": [
{
"path": "/home/milx/Persys-VMs/persys-vm.qcow2",
"path": "/var/lib/libvirt/iso/base.img",
"device": "vda",
"format": "qcow2",
"size_gb": 15,
"size_gb": 5,
"type": "disk",
"boot": true
},
{
"path": "/var/lib/libvirt/iso/ubuntu-24.04.2-live-server-amd64.iso",
"device": "hdc",
"format": "raw",
"size_gb": 0,
"type": "cdrom",
"boot": true
}
],
"networks": [
Expand All @@ -27,18 +19,17 @@
"ip_address": ""
}
],
"cloud_init": "#cloud-config\nhostname: persys-vm\nmanage_etc_hosts: true\nusers:\n - name: core\n groups: [wheel]\n sudo: [\"ALL=(ALL) NOPASSWD:ALL\"]\npackages:\n - qemu-guest-agent\nruncmd:\n - systemctl enable --now qemu-guest-agent\n - echo \"cloud-init done\" > /tmp/cloud-init.done\n",
"cloud_init": "#cloud-config\nhostname: persys-vm\nmanage_etc_hosts: true\nusers:\n - name: ubuntu\n groups: [wheel]\n sudo: [\"ALL=(ALL) NOPASSWD:ALL\"]\npackages:\n - qemu-guest-agent\nruncmd:\n - systemctl enable --now qemu-guest-agent\n - echo \"cloud-init done\" > /tmp/cloud-init.done\n",
"metadata": {
"environment": "staging",
"owner": "platform-team",
"purpose": "integration-test",
"managed-by": "persys-test-client"
},
"cloud_init_config": {
"user_data": "#cloud-config\nhostname: demo-vm-alt\nusers:\n - name: core\n",
"meta_data": "{\"instance-id\":\"demo-vm-instance\",\"local-hostname\":\"demo-vm\"}",
"network_config": "version: 2\nethernets:\n eth0:\n dhcp4: true\n",
"vendor_data": "#cloud-config\nwrite_files:\n - path: /etc/motd\n content: |\n Managed by Persys\n"
"user_data": "#cloud-config\nhostname: persys-genesis\nusers:\n - name: ubuntu\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: sudo\n lock_passwd: false\n plain_text_passwd: ubuntu\n\nssh_pwauth: true\n",
Comment thread
miladhzzzz marked this conversation as resolved.
"meta_data": "{\"instance-id\":\"persys-vm-instance\",\"local-hostname\":\"persys-genesis\"}",
"network_config": "version: 2\nethernets:\n enp1s0:\n dhcp4: true\n"
}
}

42 changes: 20 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@
module github.com/persys-dev/persysctl

go 1.24.2
go 1.24.13

require (
github.com/hashicorp/vault/api v1.16.0
github.com/persys/compute-agent v0.0.0
github.com/sirupsen/logrus v1.9.3
github.com/hashicorp/vault/api v1.22.0
github.com/persys-dev/persys-cloud/pkg v0.0.0-20260601145500-2067dfcde332
github.com/sirupsen/logrus v1.9.4
github.com/spf13/cobra v1.9.1
github.com/spf13/viper v1.20.1
google.golang.org/grpc v1.79.0
github.com/spf13/viper v1.21.0
google.golang.org/grpc v1.79.1
google.golang.org/protobuf v1.36.11
)

require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/net v0.50.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/text v0.34.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/time v0.12.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/persys/compute-agent => ../compute-agent
Loading
Loading