Giter VIP home page Giter VIP logo

qovery-cli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qovery-cli's Issues

Cannot perform authentication in WSL Windows 10

What happened:

% qovery auth --debug
DEBU[0000] debug flag is set to true

Opening your browser, waiting for your authentication...

Browser not opened and there is no authentication link provided.

What you expected to happen:

Browser opened, or at least I can click authroization link manually.

How to reproduce it (as minimally and precisely as possible):

Open ubuntu WSL in Windows 10, then:

% curl -s https://get.qovery.com | sudo bash
[sudo] password for pyk:
Downloading Qovery CLI archive...
Uncompressing qovery binary in /usr/local/bin directory

Qovery CLI is installed, you can now use 'qovery' command line
% qovery auth

Opening your browser, waiting for your authentication...
^C
% qovery auth --help
AUTH do auth on Qovery service. For example:

        qovery auth

Usage:
  qovery auth [flags]

Flags:
  -h, --help   help for auth

Global Flags:
      --debug   Enable debugging when true.
% qovery auth --debug
DEBU[0000] debug flag is set to true

Opening your browser, waiting for your authentication...

Anything else we need to know?:

Environment:

  • Qovery version (use qovery version): 0.24.2
  • OS and version: Ubuntu in WSL
  • Others:

permission denied

when run qovery init i get

2020/05/11 21:03:08 open /.qovery.yml: permission denied

without create .qovery.yml

`

Reply to the following questions to initialize Qovery for this application
For more info: https://docs.qovery.com
✔ No
✔ An existing project
✔ *****
✔ AWS | Ohio (aws/us-east-2)
✔ Yes
✔ MySQL
✔ latest
✓ database: mysql version: 8.0
✔ No
2020/05/11 21:03:08 open /.qovery.yml: permission denied

`

  • Qovery version : 0.26.1
  • OS : manjaro

Qovery can't access your repository

What happened:

After follow basic get started from https://docs.qovery.com/guides/getting-started/application-template/ I cannot deploy my template to Qovery. It's said

?[31mERROR?[0m:   Qovery can't access your repository https://github.com/user/hasura-test.git
?[32mHINT?[0m: Give access to Qovery to deploy your application. https://docs.qovery.com/docs/using-qovery/interface/cli

Via qovery status, although the QoveryGithub App installed on my account and can access all my projects.

permission

Here the cli result:

PS C:\Users\x\Documents\hasura> qovery status --
  BRANCH NAME | STATUS | ENDPOINTS | APPLICATIONS | DATABASES |
              |        |           |              |           |

  APPLICATION NAME | STATUS | DATABASES
                   |        |

  DATABASE NAME | STATUS | TYPE | VERSION | ENDPOINT | PORT | USERNAME | PASSWORD | APPLICATIONS
                |        |      |         |          |      |          |          |

?[31mERROR?[0m:   Qovery can't access your repository https://github.com/user/hasura-test.git
?[32mHINT?[0m: Give access to Qovery to deploy your application. https://docs.qovery.com/docs/using-qovery/interface/cli
PS C:\Users\x\Documents\hasura> qovery status --watch
PS C:\Users\x\Documents\hasura> qovery status --watch
PS C:\Users\x\Documents\hasura> qovery status
  BRANCH NAME | STATUS | ENDPOINTS | APPLICATIONS | DATABASES |
              |        |           |              |           |

  APPLICATION NAME | STATUS | DATABASES
                   |        |

  DATABASE NAME | STATUS | TYPE | VERSION | ENDPOINT | PORT | USERNAME | PASSWORD | APPLICATIONS
                |        |      |         |          |      |          |          |

?[31mERROR?[0m:   Qovery can't access your repository https://github.com/user/hasura-test.git
?[32mHINT?[0m: Give access to Qovery to deploy your application. https://docs.qovery.com/docs/using-qovery/interface/cli

What you expected to happen:

Qovery can access my repository and should deploying app, in this case, I used hasura for the template.

How to reproduce it (as minimally and precisely as possible):

  • qovery init -t hasura
  • Create private repo called hasura-test
  • Install Qovery and give access to hasura-test
  • cd hasura
  • git add, git commit -m "some commit", git remote add origin https://github.com/user/hasura-test.git, git push -u origin master
  • qovery status

Anything else we need to know?:

I also following this article to install Hasura: https://docs.qovery.com/guides/tutorial/graphql-api-with-hasura/. Tried everything like uninstall the Qovery Github app and install again, no luck.

Environment:

  • Qovery version (use qovery version): 0.30.4
  • OS and version: Windows 10
  • Others:

Convenient way for exporting env variables

Exporting env variables can be a pain if you have lots of variables to export:

qovery application env add PORT 8080

It would be much better from developer experience POV to be able to do it in bulk e.g. by copying from .env (simple KEY-VALUE text files, popular in e.g. Node.js ecosystem)

Heroku example: heroku config:set KEY=VALUE KEY2=VALUE2

Thanks for feedback @patarapolw

Quick start does not work on Windows 10

What happened:
I followed the instructions for the quick start and expected to see my deployment but it never happened

What you expected to happen:
To see my deployment using qovery status

How to reproduce it (as minimally and precisely as possible):
I just followed the quick start guide on a Windows 10 laptop

Anything else we need to know?:
I am attaching a screenshot

Environment:

no-deployment

Accept a container name with space

What would you like to be added:
Accept a container name that has spaces and colons.

Why is this needed:
We have containers named:

  • DB migration
  • rake mailer:daily_digest

That we had to rename to remove the spaces and colons.

It's not a big issue bug that would be nicer to be able to deploy containers with the same characters that are allowed on the UI.

The command that doesn't work:

        qovery cronjob deploy \
          --organization <org> \
          --project WebApp \
          --environment staging \
          --cronjobs "rake mailer:admin_daily_digest,rake mailer:daily_digest" \
          --tag ${{ github.sha }} \
          --watch

Error message

Error: job 'rake mailer:admin_daily_digest' not found

Thanks in advance 🙏

Can't add custom domain from the CLI

What happened:
I tried to add a custom domain to a container but I'm getting the following error:

❯ qovery container domain create --organization my_org --project WebApp --environment "production" --container web --domain "www.domain3.com"
Error: container  not found
Info: You can list all containers with: qovery container list

Though, when I list the containers, it looks to be existing:

❯ qovery container list
Name    | Type      | Status   | Last Update
web     | Container | DEPLOYED | 2023-05-24 13:25:57.483005 +0000 UTC
crontab | Container | DEPLOYED | 2023-05-24 11:05:38.631964 +0000 UTC
worker  | Container | DEPLOYED | 2023-05-24 11:05:38.088672 +0000 UTC

A second confirmation is that I simply replace create by list and it returns the list of already existing custom domains, meaning that the container exists:

❯ qovery container domain list --organization my_org --project WebApp --environment "production" --container web
Type            | Domain                                            | Validation Domain
CUSTOM_DOMAIN   | www.domain.com                                   | z55cce4d1-za1530209-gtw.z273b5fa8.rustrocks.space
CUSTOM_DOMAIN   | www.domain2.com                       | z55cce4d1-za1530209-gtw.z273b5fa8.rustrocks.space
BUILT_IN_DOMAIN | z55cce4d1-za1530209-gtw.z273b5fa8.rustrocks.space | N/A

What you expected to happen:
Add a custom domain to a container

Couldn't add custom domain

What happened:
Error: container not found

What you expected to happen:
Add a custom domain

How to reproduce it (as minimally and precisely as possible):
qovery container domain create --organization <my_org> --project WebApp --environment "production" --container "web" --domain "custom.domain.tld"

Anything else we need to know?:
It works perfectly when adding the custom domain via the web interface and delete it from the CLI with:
qovery container domain delete --organization <my_org> --project WebApp --environment "production" --container "web" --domain "custom.domain.tld"

Environment:

  • Qovery version (use qovery version): 0.58.6
  • OS and version: MacOS
  • Others:

Can't run `qovery auth` on a Mac M3

What happened:
zsh: bad CPU type in executable: qovery

What you expected to happen:
Be connected to use Qovery CLI

How to reproduce it (as minimally and precisely as possible):
Buy a MacBook Pro M3 :trollface:
Then run qovery auth

Anything else we need to know?:

Environment:

  • Qovery version (use qovery version): latest (but I can't run qovery version)
  • OS and version: Sonoma 14.3
  • Others: Chip Apple M3 Pro

Cannot deploy multiple cronjobs

What happened:
I'm trying to deploy multiple cronjobs at the same time with the following command:

qovery cronjob deploy --organization "my-org" --project "my-project" --environment "staging" --cronjobs "cron-job-1,cron-job-2" --tag=sha-b71d187 --watch

I see the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x98 pc=0x100e951d0]

goroutine 1 [running]:
github.com/qovery/qovery-cli/utils.GetJobDocker(...)
	/home/runner/work/qovery-cli/qovery-cli/utils/qovery.go:1470
github.com/qovery/qovery-cli/utils.DeployJobs(0x140000ba000, {0x140000b22a0, 0x24}, {0x16f40b76c, 0x32}, {0x0, 0x0}, {0x16f40b7a5, 0xb})
	/home/runner/work/qovery-cli/qovery-cli/utils/qovery.go:1427 +0x2b0
github.com/qovery/qovery-cli/cmd.glob..func73(0x1400022d700?, {0x10107692b?, 0x4?, 0x10107692f?})
	/home/runner/work/qovery-cli/qovery-cli/cmd/cronjob_deploy.go:68 +0x598
github.com/spf13/cobra.(*Command).execute(0x1018d3340, {0x14000257220, 0xa, 0xa})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:920 +0x654
github.com/spf13/cobra.(*Command).ExecuteC(0x1018c8f60)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
github.com/qovery/qovery-cli/cmd.Execute()
	/home/runner/work/qovery-cli/qovery-cli/cmd/root.go:19 +0x24
main.main()
	/home/runner/work/qovery-cli/qovery-cli/main.go:6 +0x1c

This is happening both on my local machine (mac M3) and on github actions

What you expected to happen:

I expect it not to throw an error and to deploy my cron-jobs

How to reproduce it (as minimally and precisely as possible):

Try to deploy multiple cron jobs

Anything else we need to know?:

Deploying cron jobs 1 by 1 works, for instance:

qovery cronjob deploy --organization "my-org" --project "my-project" --environment "staging" --cronjob "cron-job-1" --tag=sha-b71d187 --watch

Environment:

  • Qovery version (use qovery version): 0.75.3
  • OS and version: maxOS Sonoma 14.1.2 (23B2091)

Qovery logs -> open on the browser

What would you like to be added:

I would like to have the link automatically opened when i type qovery logs instead of just the hint

Why is this needed:

To avoid copy/paste the link in my browser

Bringing the CLI over to winget

What would you like to be added:
Adding the qovery CLI in Winget (Windows package manager) for easier CLI install

Why is this needed:
Winget recently released 1.0 stable, meaning it's almost bug free and it supports a lot of apps (it's open source, so anyone can add programs any time they want). I believe that bringing the Qovery CLI over to Winget will make for a much cleaner and easier install of the CLI.

One thing that I am not entirely sure of is if winget supports CLI tools. I have seen mostly apps that have executables there, although I could be completely wrong, so feel free to correct me on that.

As suggested here by Pierre, I am dropping this in here for people to vote if they would like to see this coming, as it is not planned yet. Thanks!

Be able to update an environment name

What would you like to be added:
qovery environment rename or anything similar that could allow us to rename an environment name.

Why is this needed:
When updating a PR name, we would like to synchronize it with the preview environment name

Be able to deploy an environment as type 'PREVIEW'

What would you like to be added:
When enabling the auto-creation of preview environment, they have a type set as PREVIEW.
image

I would have expect to be able to set that type when cloning an environment from the CLI via

        qovery environment clone \
          --organization <org> \
          --project WebApp \
          --environment blueprint \
          --environment-type preview \
          --new-environment-name $ENVIRONMENT_NAME

But when I do that, they are flagged as DEV instead of PREVIEW

Why is this needed:
To make the difference between each environment types

Be able to deploy several databases at once

What would you like to be added:
Like we can do to deploy containers or jobs. I would expect to be able to deploy several databases with a single command line:

qovery database deploy \
          --organization <org> \
          --project WebApp \
          --environment "[PR-${{ steps.PR.outputs.number }}] ${{ steps.PR.outputs.pr_title }}" \
          --databases "PostgreSQL,redis" \
          --watch

Why is this needed:

Qovery run does not work on Windows 10

What happened:
qovery run says that I am not authenticated

What you expected to happen:
It should execute, since I just authenticated

How to reproduce it (as minimally and precisely as possible):
Just follow the quick start guide on Windows 10

Anything else we need to know?:
I am also attaching a screenshot

Environment:

  • Qovery version (use qovery version): 0.20.0
  • OS and version: Windows 10 Pro 1809
  • Others:

auth-error

Better context on `domain list`

What would you like to be added:

A better return from the qovery container domain list command. I use it with the --json flag to be able to list and use different link from that container elsewhere. But at the moment it is just returning a link, with absolutly no id and no context. A return indicating the link between port from the container and the link would be amazing. I can make some grep / sed to get the link but It's clearly not a viable idea and can break easily.

Why is this needed:

More ease and less tinkering on my end, really just a QOL functionality.

Edit:

I have tried with the --verbose flag, and the return from the API seems to be more thorough, but seems to be translated when passing a --json flag. But extracting that return is a bit tedious.

Result in the --verbose return

{
  "results": [
    {
      "url": "https://custom+default-url.from.qovery",
      "internal_port": 8010,
      "external_port": 443,
      "is_qovery_domain": true,
      "is_default": false
    },
    {
      "url": "https://default-url.from.qovery",
      "internal_port": 8020,
      "external_port": 443,
      "is_qovery_domain": true,
      "is_default": true
    }
  ]
}

Instead of

[
  {
    "domain": "custom+default-url.from.qovery",
    "id": null,
    "type": "BUILT_IN_DOMAIN",
    "validation_domain": null
  },
  {
    "domain": "default-url.from.qovery",
    "id": null,
    "type": "BUILT_IN_DOMAIN",
    "validation_domain": null
  }
]

"qovery deploy list" prints commits from other branches than the current branch

What happened:
qovery deploy list prints a list of commits - being on master branch, commits from my feature branch are also printed:

image

Commits on the screenshot above are printed as commits from 'master', yet they were not pushed/merged to master yet. Those are commits from other branch.

What you expected to happen:
qovery deploy list print a list of commits only from the current branch

How to reproduce it (as minimally and precisely as possible):
Create a new branch, commit & push some changes, checkout to master and run qovery deploy list.

You could also use my project as an example - https://github.com/appwish/wishservice
Compare qovery deploy list output on 'master' and 'qovery' branches.

Environment:

  • Qovery version (use qovery version): 0.12.2
  • OS and version: macOS 10.15.3

Be able to specify the context inline on a command

What would you like to be added:

Be able to specify the context inline on a command

qovery shell --context webapp:staging:web

qovery shell -c webapp:production:worker

Also, that will remove the need to have a confirmation input to validate the current context, because the user did already manually specified the context they want
image

Why is this needed:
For someone who manages multiple instances/environments and needs to access those envs regularly, having to go through the menu selection is slow and a bit tedious
instead passing the context inline will be much faster, and will also allow to reuse shell history and auto-completion on their terminal

[Minor] Got "missing EXPOSE 1-65535" despite I have an EXPOSE

What happened:

I got this error when running qovery status on a newly setup project:

ERROR:   missing "EXPOSE 1-65535" instruction in the Dockerfile
SOLUTION: Add EXPOSE {your application port} (port range: 1-65535) instruction inside your Dockerfile

Despite having an expose in my Dockerfile:

EXPOSE 8080/tcp

I got it fixed by removing the /tcp but this is valid syntax: https://docs.docker.com/engine/reference/builder/#expose

What you expected to happen:

No error.

How to reproduce it (as minimally and precisely as possible):

Provide the protocol to the EXPOSE.

Anything else we need to know?:

Minor issue but can be confusing for newcomers.

Environment:

  • Qovery version (use qovery version): 0.31.6
  • OS and version: ArchLinux
  • Others:

Handle git 'detached head' gracefully

Steps:
Checkout a branch on your project where Qovery is enabled. Go detached head (ex: git checkout head^1)
Run: qovery run

Actual behavior:

fmt.Println("The current directory is not a Qovery project. Please consider using 'qovery init'")
is triggered

Expected behavior: handle the detached head, or advise the user with a more precise log message

upgrade complete but didn't change version

[aliammar@aliammar learnnest]$ qovery upgrade
Upgrading Qovery CLI to version 0.26.4
[aliammar@aliammar learnnest]$ qovery version
0.26.1[aliammar@aliammar learnnest]$ 

when upgrade no things change and still in old version
if i try upgrade again same things happens

Environment:

  • OS and version: manjaro

Launched qovery init on second drive

What happened:
Tried to init qovery in a project stored on the second drive

What you expected to happen:
Qovery initialized

How to reproduce it (as minimally and precisely as possible):
Init qovery on a non boot drive

Anything else we need to know?:
ERROR ==> panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0x77a900]

goroutine 1 [running]:
qovery.go/api.CheckHTTPResponse(0x0)
/home/runner/work/qovery-cli/qovery-cli/api/api.go:18 +0x30
qovery.go/api.GetAccount(0xc1c3c0, 0xc0000da480, 0x0, 0x0)
/home/runner/work/qovery-cli/qovery-cli/api/account.go:21 +0x23e
qovery.go/cmd.glob..func9(0x130d040, 0x1336e60, 0x0, 0x0)
/home/runner/work/qovery-cli/qovery-cli/cmd/init.go:39 +0x8e
github.com/spf13/cobra.(*Command).execute(0x130d040, 0x1336e60, 0x0, 0x0, 0x130d040, 0x1336e60)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2b1
github.com/spf13/cobra.(*Command).ExecuteC(0x130d7c0, 0xc00005ff50, 0xc0001b9f50, 0x405aa6)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x302
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
main.main()
/home/runner/work/qovery-cli/qovery-cli/qovery.go:10 +0x38

Environment:

  • Qovery version (use qovery version): 0.7.1
  • OS and version: win10 1909
  • Others: powershell 5

Update qovery install script to account for arm64 architecture

What would you like to be added:
Update qovery install script to account for arm64 architecture, and not hardcode amd64

an update proposal to the script:

#!/usr/bin/env bashset -e
#set -xecho "##################################"
echo "#                                #"
echo "#       QOVERY CLI INSTALL       #"
echo "#                                #"
echo "##################################"
echo ""
​
repo="Qovery/qovery-cli"
output_tgz="/tmp/qovery.tgz"
dest_binary="/usr/local/bin"
os=$(uname | tr '[:upper:]' '[:lower:]')
arch=$(uname -m)if [ "$arch" != "aarch64" ]; then
  arch="arm64"
else
  arch="amd64"
fiecho "[+] Downloading Qovery CLI archive..."
​
latest_tag=$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
version=$(echo $latest_tag | sed 's/^v//')test -f $output_tgz && rm -f $output_tgz
curl -o $output_tgz -sOL "https://github.com/${repo}/releases/download/${latest_tag}/qovery-cli_${version}_${os}_${arch}.tar.gz"echo "[+] Uncompressing qovery binary in $dest_binary directory (sudo permissions are required)"
sudo tar -xzf $output_tgz -C $dest_binary qovery
rm -f $output_tgzecho -e "\nQovery CLI is installed, you can now use 'qovery' command line"

Why is this needed:
when running the installer on an arm arch, the qovery doesn't work, since the installer didn't fetch the arm64 build

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.