Skip to content
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

feat: port the python runpod project cli to go #55

Merged
merged 44 commits into from
Dec 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ff9ec66
get inquire
DireLines Nov 22, 2023
e4fbb2d
take input for project new, link commands
DireLines Nov 24, 2023
812e299
take input for project new, link commands
DireLines Nov 24, 2023
ff82ec1
ignore main build
DireLines Nov 24, 2023
1720d93
styling on net vol select
DireLines Nov 24, 2023
494f8fc
edge case with prompt choice
DireLines Nov 24, 2023
d7a8c23
fetch user network volumes
DireLines Nov 24, 2023
b8d8999
move net vol query
DireLines Nov 24, 2023
8c949bf
copy project starter templates
DireLines Nov 26, 2023
b73f27b
copy template files over
DireLines Nov 26, 2023
565a5bb
match perms of generated files
DireLines Nov 26, 2023
d24157b
factor out copyFiles
DireLines Nov 26, 2023
e317ce3
produce toml but do not write to file yet
DireLines Nov 27, 2023
5411dda
write toml
DireLines Nov 27, 2023
56ddb04
replace <<RUNPOD>> with runpod for now
DireLines Nov 27, 2023
6478b30
tweak
DireLines Nov 27, 2023
78da27c
start project start
DireLines Nov 27, 2023
b6a647b
needed to install some things to make
DireLines Dec 4, 2023
21ac948
generate ssh key in config
DireLines Dec 4, 2023
5166802
upload ssh pub key in config
DireLines Dec 5, 2023
6024b3f
rename function
DireLines Dec 5, 2023
53efec2
match format of pub key
DireLines Dec 5, 2023
1606b2c
start ssh connection wrapper
DireLines Dec 6, 2023
59546b8
get an ssh command to work
DireLines Dec 6, 2023
dc4d3fe
launchDevPod part 1 still broken
DireLines Dec 10, 2023
1499d93
launchDevPod part 1 - pod created but network volume not necessarily …
DireLines Dec 10, 2023
7085eda
launchDevPod - attach net vol
DireLines Dec 10, 2023
cbe8da4
launchDevPod complete
DireLines Dec 10, 2023
f4b04e0
listen to remote logs
DireLines Dec 11, 2023
87e6118
theoretically finish project start, but there are bugs
DireLines Dec 11, 2023
50c4427
command needed to be unified
DireLines Dec 11, 2023
3822af1
bug fixes
DireLines Dec 11, 2023
1078b5c
recursive watcher, handle modify and create files
DireLines Dec 11, 2023
a319231
correct command phrasing
DireLines Dec 11, 2023
ae3165f
deployProject up until creating template/endpoint
DireLines Dec 11, 2023
b28d5fb
skeleton for deploy endpoint
DireLines Dec 11, 2023
eb3eaf0
some incorrect boilerplate
DireLines Dec 11, 2023
18b4270
create template but something is wrong with it
DireLines Dec 12, 2023
589a649
create working endpoint!
DireLines Dec 12, 2023
4badb24
allow updating template of existing endpoint
DireLines Dec 12, 2023
31d59d2
don't print template input
DireLines Dec 12, 2023
c428459
IT IS DONE
DireLines Dec 12, 2023
7cb567e
use config.toml instead of config.yaml
DireLines Dec 12, 2023
5284377
fix typo
DireLines Dec 12, 2023
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
Prev Previous commit
Next Next commit
move net vol query
  • Loading branch information
DireLines committed Nov 24, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b8d89995e89fc55a6f4a4a623bc42c832ea477a7
17 changes: 11 additions & 6 deletions cmd/project/project.go
Original file line number Diff line number Diff line change
@@ -57,6 +57,17 @@ var NewProjectCmd = &cobra.Command{
Short: "create a new project",
Long: "create a new Runpod project folder",
Run: func(cmd *cobra.Command, args []string) {
networkVolumes, err := api.GetNetworkVolumes()
if err != nil {
fmt.Println("Something went wrong trying to fetch network volumes")
fmt.Println(err)
return
}
if len(networkVolumes) == 0 {
fmt.Println("You do not have any network volumes.")
fmt.Println("Please create a network volume (https://runpod.io/console/user/storage) and try again.")
return
}
fmt.Println("Creating a new project...")
if projectName == "" {
projectName = prompt("Enter the project name")
@@ -69,12 +80,6 @@ var NewProjectCmd = &cobra.Command{
Inactive: ` {{ .Name | white }}`,
Selected: ` {{ .Name | white }}`,
}
networkVolumes, err := api.GetNetworkVolumes()
if err != nil {
fmt.Println("Something went wrong trying to fetch network volumes")
fmt.Println(err)
return
}
options := []NetVolOption{}
for _, networkVolume := range networkVolumes {
options = append(options, NetVolOption{Name: fmt.Sprintf("%s: %s (%d GB, %s)", networkVolume.Id, networkVolume.Name, networkVolume.Size, networkVolume.DataCenterId), Value: networkVolume.Id})