Skip to content

Commit

Permalink
Allow empty registries in the provider (#1431)
Browse files Browse the repository at this point in the history
* Applied #1429 in 0.14

* Update 0.14 patch version

* Updated helm lock
  • Loading branch information
Tansito authored Aug 1, 2024
1 parent 211cb38 commit e8e4daf
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 28 deletions.
6 changes: 3 additions & 3 deletions charts/qiskit-serverless/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies:
- name: gateway
repository: ""
version: 0.14.1
version: 0.14.2
- name: nginx-ingress-controller
repository: https://charts.bitnami.com/bitnami
version: 9.11.0
Expand All @@ -11,5 +11,5 @@ dependencies:
- name: kuberay-operator
repository: https://ray-project.github.io/kuberay-helm
version: 1.1.1
digest: sha256:43d30e0ff94d7453702f4de3d1efc3eea782d3ec45d7594c560e3e6d3675aa76
generated: "2024-07-29T11:10:24.552213-04:00"
digest: sha256:31e0c7ee15c26725bd1b559f24fa30fbdab506de77afc0311c6657ddf890ed2c
generated: "2024-08-01T16:29:27.215746-04:00"
6 changes: 3 additions & 3 deletions charts/qiskit-serverless/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ description: Qiskit-Serverless helm chart that contains different dependencies.

type: application

version: 0.14.1
appVersion: "0.14.1"
version: 0.14.2
appVersion: "0.14.2"

dependencies:
- name: gateway
condition: gatewayEnable
version: 0.14.1
version: 0.14.2
- name: nginx-ingress-controller
condition: nginxIngressControllerEnable
version: 9.11.0
Expand Down
4 changes: 2 additions & 2 deletions charts/qiskit-serverless/charts/gateway/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.14.1
version: 0.14.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.14.1"
appVersion: "0.14.2"
6 changes: 3 additions & 3 deletions charts/qiskit-serverless/charts/gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ application:
superuser:
enable: true
ray:
nodeImage: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py39"
nodeImage_py39: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py39"
nodeImage_py310: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310"
nodeImage: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.2-py39"
nodeImage_py39: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.2-py39"
nodeImage_py310: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.2-py310"
cpu: 2
memory: 2
replicas: 1
Expand Down
6 changes: 3 additions & 3 deletions charts/qiskit-serverless/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Qiskit Serverless Info
# ===================
global:
version: 0.14.1
version: 0.14.2

# ===================
# Qiskit Serverless configs
Expand Down Expand Up @@ -47,7 +47,7 @@ gateway:
image:
repository: "icr.io/quantum-public/qiskit-serverless/gateway"
pullPolicy: IfNotPresent
tag: "0.14.1"
tag: "0.14.2"
application:
siteHost: "http://gateway:8000"
rayHost: "http://kuberay-head-svc:8265"
Expand All @@ -59,7 +59,7 @@ gateway:
type: ClusterIP
port: 8000
ray:
nodeImage: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310"
nodeImage: "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.2-py310"
opensslImage: registry.access.redhat.com/ubi8/openssl:8.8-9
kubectlImage: alpine/k8s:1.29.2@sha256:a51aa37f0a34ff827c7f2f9cb7f6fbb8f0e290fa625341be14c2fcc4b1880f60
limits:
Expand Down
2 changes: 1 addition & 1 deletion client/qiskit_serverless/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.1
0.14.2
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
services:
ray-head:
container_name: ray-head
image: icr.io/quantum-public/qiskit-serverless/ray-node:${VERSION:-0.14.1}-py310
image: icr.io/quantum-public/qiskit-serverless/ray-node:${VERSION:-0.14.2}-py310
entrypoint: [
"ray", "start", "--head", "--port=6379",
"--dashboard-host=0.0.0.0", "--block"
Expand All @@ -27,7 +27,7 @@ services:
always
gateway:
container_name: gateway
image: icr.io/quantum-public/qiskit-serverless/gateway:${VERSION:-0.14.1}
image: icr.io/quantum-public/qiskit-serverless/gateway:${VERSION:-0.14.2}
command: gunicorn main.wsgi:application --bind 0.0.0.0:8000 --workers=4
ports:
- 8000:8000
Expand All @@ -52,7 +52,7 @@ services:
- postgres
scheduler:
container_name: scheduler
image: icr.io/quantum-public/qiskit-serverless/gateway:${VERSION:-0.14.1}
image: icr.io/quantum-public/qiskit-serverless/gateway:${VERSION:-0.14.2}
entrypoint: "./scripts/scheduler.sh"
environment:
- DEBUG=0
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/cloud.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Once your cluster is ready, the installation is relatively straightforward with
and run the next commands:

.. code-block::
:caption: run this commands with the release version like 0.14.1 in x.y.z (2 places)
:caption: run this commands with the release version like 0.14.2 in x.y.z (2 places)
$ helm -n <INSERT_YOUR_NAMESPACE> install qiskit-serverless --create-namespace https://github.com/Qiskit/qiskit-serverless/releases/download/vx.y.z/qiskit-serverless-x.y.z.tgz
Expand Down Expand Up @@ -119,6 +119,6 @@ with the configuration of your domain and provider.
Optionally, you can install an observability package to handle logging and monitoring on your cluster by running the following command:

.. code-block::
:caption: run this commands with the release version like 0.14.1 in x.y.z (2 places) using the same namespace as in the previous helm command
:caption: run this commands with the release version like 0.14.2 in x.y.z (2 places) using the same namespace as in the previous helm command
$ helm -n <INSERT_YOUR_NAMESPACE> install qs-observability https://github.com/Qiskit/qiskit-serverless/releases/download/vx.y.z/qs-observability-x.y.z.tgz
2 changes: 1 addition & 1 deletion docs/deployment/custom_function/Sample-Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310
FROM icr.io/quantum-public/qiskit-serverless/ray-node:0.14.2-py310

# install all necessary dependencies for your custom image

Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/deploying_custom_image_function.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ In our simple case it will look something like this:
.. code-block::
:caption: Dockerfile for custom image function.
FROM icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310
FROM icr.io/quantum-public/qiskit-serverless/ray-node:0.14.2-py310
# install all necessary dependencies for your custom image
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/example_custom_image_function.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Dockerfile
.. code-block::
:caption: Dockerfile
FROM icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310
FROM icr.io/quantum-public/qiskit-serverless/ray-node:0.14.2-py310
# install all necessary dependencies for your custom image
Expand Down
9 changes: 5 additions & 4 deletions gateway/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,18 @@ def validate(self, attrs):
raise ValidationError(
"At least one of attributes (entrypoint, image) is required."
)

title = attrs.get("title")
provider = attrs.get("provider", None)
if provider and "/" in title:
raise ValidationError("Provider defined in title and in provider fields.")

title_split = title.split("/")
if len(title_split) > 2:
raise ValidationError(
"Qiskit Function title is malformed. It can only contain one slash."
)

if image is not None:
if provider is None and len(title_split) != 2:
raise ValidationError(
Expand All @@ -59,10 +62,8 @@ def validate(self, attrs):
provider = title_split[0]
provider_instance = Provider.objects.filter(name=provider).first()
if provider_instance is None:
raise ValidationError(
"Custom images are only available a valid provider."
)
if not provider_instance.registry or not image.startswith(
raise ValidationError(f"{provider} is not valid provider.")
if provider_instance.registry and not image.startswith(
provider_instance.registry
):
raise ValidationError(
Expand Down
2 changes: 1 addition & 1 deletion gateway/main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
),
}
RAY_NODE_IMAGE = os.environ.get(
"RAY_NODE_IMAGE", "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.1-py310"
"RAY_NODE_IMAGE", "icr.io/quantum-public/qiskit-serverless/ray-node:0.14.2-py310"
)
RAY_NODE_IMAGES_MAP = {
"default": RAY_NODE_IMAGE,
Expand Down

0 comments on commit e8e4daf

Please sign in to comment.