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

Service version #15

Closed
inluxc opened this issue Jul 16, 2021 · 2 comments
Closed

Service version #15

inluxc opened this issue Jul 16, 2021 · 2 comments
Labels
kind: enhancement New feature or request
Milestone

Comments

@inluxc
Copy link

inluxc commented Jul 16, 2021

Is your feature request related to a problem? Please describe.
Be able to choose the service version in the request payload:

{
   "service":"mysql",
   "version":"8.0.25",
   "configs":{
      "rootPassword":"root",
      "database":"peanut",
      "username":"peanut",
      "password":"secret"
   }
}
@Clivern
Copy link
Owner

Clivern commented Jul 16, 2021

yeah, i thought about this so i don't have to maintain versions. Luckily there is an API i can use.

$ curl 'https://registry.hub.docker.com/v2/repositories/library/mysql/tags/?page_size=1000' -s | jq '."results"[]["name"]'

i will probably have to cache them for a while otherwise docker authentication will be needed.

@Clivern Clivern added this to the 0.3.x milestone Jul 16, 2021
@Clivern Clivern added the kind: enhancement New feature or request label Jul 16, 2021
@Clivern Clivern closed this as completed Jul 18, 2021
@Clivern
Copy link
Owner

Clivern commented Jul 18, 2021

@inluxc you have to use version 0.3.0 upward. here is the API calls:

$ curl -X GET http://127.0.0.1:8000/api/v1/tag/mysql/true \
    -H 'x-api-key: ~api~key~here~'


$ curl -X POST http://127.0.0.1:8000/api/v1/service \
    -d '{"service":"mysql", "version": "x.x.x", "configs": {"rootPassword": "root", "database": "peanut", "username": "peanut", "password": "secret"}}' \
    -H 'x-api-key: ~api~key~here~'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants