Skip to content

Commit

Permalink
Merge branch 'main' into renovate/django-4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
IceKhan13 authored Nov 29, 2023
2 parents 8fd9d2f + 4fca160 commit cc17cca
Show file tree
Hide file tree
Showing 45 changed files with 406 additions and 399 deletions.
2 changes: 1 addition & 1 deletion .github/actions/helm-lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
check-latest: true

- name: Set up chart-testing
uses: helm/[email protected].0
uses: helm/[email protected].1

- name: Run chart-testing (list-changed)
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile-ray-node
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ COPY --chown=$RAY_UID:$RAY_UID ./client ./qs

WORKDIR /qs
# TODO: certifi version pinned to 2023.7.22. More info in #870
# TODO: pyarrow version pinned to 14.0.1
RUN pip install . --no-cache-dir &&\
pip install --no-cache-dir pyarrow==14.0.1 &&\
pip install --no-cache-dir certifi==2023.7.22

WORKDIR /
Expand All @@ -30,7 +32,9 @@ COPY --chown=$RAY_UID:$RAY_UID ./client ./qs

WORKDIR /qs
# TODO: certifi version pinned to 2023.7.22. More info in #870
# TODO: pyarrow version pinned to 14.0.1
RUN pip install . --no-cache-dir &&\
pip install --no-cache-dir pyarrow==14.0.1 &&\
if [ "$TARGETARCH" = "arm64" ] ; \
then pip install --no-cache-dir certifi==2023.7.22 ; \
fi
Expand Down
4 changes: 2 additions & 2 deletions charts/qs-observability/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: Quantum-Serverless helm chart for observabililty (i.e. logging/moni

type: application

version: 0.7.1
appVersion: "0.7.1"
version: 0.8.0
appVersion: "0.8.0"

dependencies:
- name: kube-prometheus-stack
Expand Down
10 changes: 5 additions & 5 deletions charts/quantum-serverless/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dependencies:
- name: gateway
repository: ""
version: 0.7.1
version: 0.8.0
- name: jupyter
repository: ""
version: 0.7.1
version: 0.8.0
- name: nginx-ingress-controller
repository: https://charts.bitnami.com/bitnami
version: 9.7.9
Expand All @@ -16,6 +16,6 @@ dependencies:
version: 13.4.1
- name: repository
repository: ""
version: 0.7.1
digest: sha256:79b36ac71d72a147697d266d41213eee13db9df60596cea2443ab842e86b6c59
generated: "2023-11-01T17:24:51.987195-04:00"
version: 0.8.0
digest: sha256:16d9864c27fc63b007749e640965fb8ae11a6c5380a30bfa5f351a79ae360460
generated: "2023-11-20T14:22:27.83668771Z"
10 changes: 5 additions & 5 deletions charts/quantum-serverless/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ description: Quantum-Serverless helm chart that contains different dependencies.

type: application

version: 0.7.1
appVersion: "0.7.1"
version: 0.8.0
appVersion: "0.8.0"

dependencies:
- name: gateway
condition: gatewayEnable
version: 0.7.1
version: 0.8.0
- name: jupyter
condition: jupyterEnable
version: 0.7.1
version: 0.8.0
- name: nginx-ingress-controller
condition: nginxIngressControllerEnable
version: 9.7.9
Expand All @@ -28,7 +28,7 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
- name: repository
condition: repositoryEnable
version: 0.7.1
version: 0.8.0

maintainers:
- name: akihikokuroda
Expand Down
4 changes: 2 additions & 2 deletions charts/quantum-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.7.1
version: 0.8.0

# 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.7.1"
appVersion: "0.8.0"
10 changes: 5 additions & 5 deletions charts/quantum-serverless/charts/gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ application:
superuser:
enable: true
ray:
nodeImage: "icr.io/quantum-public/quantum-serverless-ray-node:0.7.1-py39"
nodeImage_py38: "icr.io/quantum-public/quantum-serverless-ray-node:0.7.1-py38"
nodeImage_py39: "icr.io/quantum-public/quantum-serverless-ray-node:0.7.1-py39"
nodeImage_py310: "icr.io/quantum-public/quantum-serverless-ray-node:0.7.1-py310"
nodeImage: "icr.io/quantum-public/quantum-serverless-ray-node:0.8.0-py39"
nodeImage_py38: "icr.io/quantum-public/quantum-serverless-ray-node:0.8.0-py38"
nodeImage_py39: "icr.io/quantum-public/quantum-serverless-ray-node:0.8.0-py39"
nodeImage_py310: "icr.io/quantum-public/quantum-serverless-ray-node:0.8.0-py310"
cpu: 2
memory: 2
replicas: 1
minReplicas: 1
maxReplicas: 4
opensslImage: registry.access.redhat.com/ubi8/openssl:8.8-9
kubectlImage: alpine/k8s:1.28.3@sha256:80cc5c2761e25873a2f15899354cc0fd0b7b3485499be01ece6573834b0b5b15
kubectlImage: alpine/k8s:1.28.4@sha256:38887b75951c9839c276508c6ba4d55793e4724668c6ba9bd8d09a212073d914
scrapeWithPrometheus: true
openTelemetry: false
openTelemetryCollector:
Expand Down
4 changes: 2 additions & 2 deletions charts/quantum-serverless/charts/jupyter/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.7.1
version: 0.8.0

# 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.7.1"
appVersion: "0.8.0"
4 changes: 2 additions & 2 deletions charts/quantum-serverless/charts/repository/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.7.1
version: 0.8.0

# 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.7.1"
appVersion: "0.8.0"
10 changes: 5 additions & 5 deletions charts/quantum-serverless/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ gateway:
image:
repository: "icr.io/quantum-public/quantum-serverless-gateway"
pullPolicy: IfNotPresent
tag: "0.7.1"
tag: "0.8.0"
application:
siteHost: "http://gateway:8000"
rayHost: "http://kuberay-head-svc:8265"
Expand All @@ -57,9 +57,9 @@ gateway:
type: ClusterIP
port: 8000
ray:
nodeImage: "icr.io/quantum-public/quantum-serverless-ray-node:0.7.1-py39"
nodeImage: "icr.io/quantum-public/quantum-serverless-ray-node:0.8.0-py39"
opensslImage: registry.access.redhat.com/ubi8/openssl:8.8-9
kubectlImage: alpine/k8s:1.28.3@sha256:80cc5c2761e25873a2f15899354cc0fd0b7b3485499be01ece6573834b0b5b15
kubectlImage: alpine/k8s:1.28.4@sha256:38887b75951c9839c276508c6ba4d55793e4724668c6ba9bd8d09a212073d914
limits:
maxJobsPerUser: 2
maxComputeResources: 4
Expand Down Expand Up @@ -112,7 +112,7 @@ jupyter:

image:
repository: "icr.io/quantum-public/quantum-serverless-notebook"
tag: "0.7.1-py39"
tag: "0.8.0-py39"
pullPolicy: IfNotPresent
container:
port: 8888
Expand Down Expand Up @@ -182,7 +182,7 @@ repository:
fullnameOverride: "repository"
image:
pullPolicy: IfNotPresent
tag: "0.7.1"
tag: "0.8.0"
application:
superuser:
username: "admin"
Expand Down
2 changes: 1 addition & 1 deletion client/quantum_serverless/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.1
0.8.0
27 changes: 3 additions & 24 deletions client/quantum_serverless/core/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,6 @@ def __init__(
name: Optional[str] = None,
host: Optional[str] = None,
version: Optional[str] = None,
username: Optional[str] = None,
password: Optional[str] = None,
token: Optional[str] = None,
verbose: bool = False,
):
Expand All @@ -368,8 +366,6 @@ def __init__(
name: name of provider
host: host of gateway
version: version of gateway
username: username
password: password
token: authorization token
"""
name = name or "gateway-provider"
Expand All @@ -382,22 +378,17 @@ def __init__(
version = GATEWAY_PROVIDER_VERSION_DEFAULT

token = token or os.environ.get(ENV_GATEWAY_PROVIDER_TOKEN)
if token is None and (username is None or password is None):
if token is None:
raise QuantumServerlessException(
"Authentication credentials must "
"be provided in form of `username` "
"and `password` or `token`."
"Authentication credentials must be provided in form of `token`."
)

super().__init__(name)
self.verbose = verbose
self.host = host
self.version = version
if token is not None:
self._verify_token(token)
self._verify_token(token)
self._token = token
if token is None:
self._fetch_token(username, password)

self._job_client = GatewayJobClient(self.host, self._token, self.version)
self._files_client = GatewayFilesClient(self.host, self._token, self.version)
Expand Down Expand Up @@ -452,18 +443,6 @@ def file_upload(self, file: str):
def get_programs(self, **kwargs) -> List[QiskitPattern]:
return self._job_client.get_programs(**kwargs)

def _fetch_token(self, username: str, password: str):
response_data = safe_json_request(
request=lambda: requests.post(
url=f"{self.host}/dj-rest-auth/keycloak/login/",
data={"username": username, "password": password},
timeout=REQUESTS_TIMEOUT,
),
verbose=self.verbose,
)

self._token = response_data.get("access")

def _verify_token(self, token: str):
"""Verify token."""
try:
Expand Down
3 changes: 2 additions & 1 deletion client/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ reno>=3.5.0
# the ~= specifier for it.
black[jupyter]~=22.12
requests-mock>=1.11.0
testcontainers>=3.7.1
# new versions of testcontainers don't support docker compose
testcontainers==3.7.1
tox>=4.0.0
2 changes: 1 addition & 1 deletion client/requirements-notebook.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# TODO: ipython version pinned to 8.10.0. More info in #978
# TODO: matplotlib version pinned to 3.7.1. More info in #1037
ipywidgets==8.1.1
circuit-knitting-toolbox==0.4.0
circuit-knitting-toolbox==0.5.0
matplotlib==3.7.1
qiskit-ibmq-provider==0.20.2
qiskit-aer==0.13.0
Expand Down
9 changes: 5 additions & 4 deletions client/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
ray[default,data]>=2.7.1, <3
ray[default,data]>=2.8.0, <3
requests>=2.31.0
importlib-metadata>=5.2.0
qiskit>=0.44.3
qiskit-ibm-runtime>=0.13.0
cloudpickle>=2.2.1
qiskit>=0.45.0
qiskit-ibm-runtime>=0.15.1
# TODO: make sure ray node and notebook node have the same version of cloudpickle
cloudpickle==2.2.1
tqdm>=4.65.0
# opentelemetry
opentelemetry-api>=1.18.0
Expand Down
31 changes: 2 additions & 29 deletions docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,6 @@ services:
- safe-tier
restart:
always
keycloak:
container_name: keycloak
image: bitnami/keycloak:20.0.5-debian-11-r4
volumes:
- ./realm-export.json:/opt/keycloak/data/import/realm-export.json
environment:
KEYCLOAK_DATABASE_HOST: postgres
KEYCLOAK_DATABASE_NAME: testkeycloakdb
KEYCLOAK_DATABASE_USER: testkeycloakuser
KEYCLOAK_DATABASE_SCHEMA: public
KEYCLOAK_DATABASE_PASSWORD: testkeycloakpassword
KEYCLOAK_ADMIN_USER: admin
KEYCLOAK_ADMIN_PASSWORD: 123
KEYCLOAK_HTTP_PORT: 8080
KEYCLOAK_EXTRA_ARGS: "-Dkeycloak.import=/opt/keycloak/data/import/realm-export.json"
ports:
- 8085:8080
depends_on:
- postgres
networks:
- safe-tier
restart:
always
gateway:
container_name: gateway
build:
Expand All @@ -79,11 +56,8 @@ services:
- DJANGO_SUPERUSER_USERNAME=admin
- DJANGO_SUPERUSER_PASSWORD=123
- [email protected]
- SETTING_KEYCLOAK_URL=http://keycloak:8080
- SETTING_KEYCLOAK_REALM=quantum-serverless
- SETTINGS_KEYCLOAK_CLIENT_SECRET=supersecret
- SITE_HOST=http://gateway:8000
# - SETTINGS_AUTH_MECHANISM=default #custom_token
- SETTINGS_AUTH_MECHANISM=mock_token
# - SETTINGS_TOKEN_AUTH_URL=<URL_FOR_TOKEN_VERIFICATION>
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
Expand All @@ -95,7 +69,6 @@ services:
volumes:
- program-artifacts:/usr/src/app/media/
depends_on:
- keycloak
- postgres
scheduler:
container_name: scheduler
Expand All @@ -112,12 +85,12 @@ services:
- DATABASE_PASSWORD=testkeycloakpassword
- RAY_CLUSTER_MODE_LOCAL_HOST=http://ray-head:8265
- RAY_CLUSTER_MODE_LOCAL=1
- SETTINGS_AUTH_MECHANISM=mock_token
networks:
- safe-tier
volumes:
- program-artifacts:/usr/src/app/media/
depends_on:
- keycloak
- postgres
repository-server:
container_name: repository-server
Expand Down
Loading

0 comments on commit cc17cca

Please sign in to comment.