Merge "Specify the runtime image version explicitly"

This commit is contained in:
Zuul 2018-06-05 13:55:50 +00:00 committed by Gerrit Code Review
commit 97481bf291
9 changed files with 24 additions and 7 deletions

View File

@ -29,7 +29,7 @@ function install_k8s {
# test. # test.
sudo docker pull $QINLING_PYTHON_RUNTIME_IMAGE sudo docker pull $QINLING_PYTHON_RUNTIME_IMAGE
sudo docker pull $QINLING_NODEJS_RUNTIME_IMAGE sudo docker pull $QINLING_NODEJS_RUNTIME_IMAGE
sudo docker pull openstackqinling/sidecar sudo docker pull $QINLING_SIDECAR_IMAGE
sudo docker pull openstackqinling/alpine-test sudo docker pull openstackqinling/alpine-test
} }

View File

@ -22,7 +22,8 @@ QINLING_CONF_FILE=${QINLING_CONF_DIR}/qinling.conf
QINLING_POLICY_FILE=${QINLING_CONF_DIR}/policy.json QINLING_POLICY_FILE=${QINLING_CONF_DIR}/policy.json
QINLING_AUTH_CACHE_DIR=${QINLING_AUTH_CACHE_DIR:-/var/cache/qinling} QINLING_AUTH_CACHE_DIR=${QINLING_AUTH_CACHE_DIR:-/var/cache/qinling}
QINLING_FUNCTION_STORAGE_DIR=${QINLING_FUNCTION_STORAGE_DIR:-/opt/qinling/funtion/packages} QINLING_FUNCTION_STORAGE_DIR=${QINLING_FUNCTION_STORAGE_DIR:-/opt/qinling/funtion/packages}
QINLING_PYTHON_RUNTIME_IMAGE=${QINLING_PYTHON_RUNTIME_IMAGE:-openstackqinling/python-runtime} QINLING_PYTHON_RUNTIME_IMAGE=${QINLING_PYTHON_RUNTIME_IMAGE:-openstackqinling/python-runtime:0.0.2}
QINLING_NODEJS_RUNTIME_IMAGE=${QINLING_NODEJS_RUNTIME_IMAGE:-openstackqinling/nodejs-runtime} QINLING_NODEJS_RUNTIME_IMAGE=${QINLING_NODEJS_RUNTIME_IMAGE:-openstackqinling/nodejs-runtime:0.0.1}
QINLING_SIDECAR_IMAGE=${QINLING_SIDECAR_IMAGE:-openstackqinling/sidecar:0.0.1}
QINLING_K8S_APISERVER_TLS=${QINLING_K8S_APISERVER_TLS:-True} QINLING_K8S_APISERVER_TLS=${QINLING_K8S_APISERVER_TLS:-True}

View File

@ -112,6 +112,11 @@ engine_opts = [
default=3, default=3,
help='Maximum number of concurrent executions per function.' help='Maximum number of concurrent executions per function.'
), ),
cfg.StrOpt(
'sidecar_image',
default='openstackqinling/sidecar:0.0.1',
help='The sidecar image being used in the worker.'
),
] ]
STORAGE_GROUP = 'storage' STORAGE_GROUP = 'storage'

View File

@ -111,6 +111,7 @@ class KubernetesManager(base.OrchestratorBase):
"replicas": self.conf.kubernetes.replicas, "replicas": self.conf.kubernetes.replicas,
"container_name": 'worker', "container_name": 'worker',
"image": image, "image": image,
"sidecar_image": self.conf.engine.sidecar_image
} }
) )

View File

@ -35,7 +35,7 @@ spec:
- name: package-folder - name: package-folder
mountPath: /var/qinling/packages mountPath: /var/qinling/packages
- name: sidecar - name: sidecar
image: openstackqinling/sidecar image: {{ sidecar_image }}
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 9091 - containerPort: 9091

View File

@ -152,7 +152,8 @@ class TestKubernetesManager(base.DbTestCase):
'labels': {'runtime_id': fake_deployment_name}, 'labels': {'runtime_id': fake_deployment_name},
'replicas': fake_replicas, 'replicas': fake_replicas,
'container_name': 'worker', 'container_name': 'worker',
'image': fake_image 'image': fake_image,
'sidecar_image': CONF.engine.sidecar_image
} }
) )
self.k8s_v1_ext.create_namespaced_deployment.assert_called_once_with( self.k8s_v1_ext.create_namespaced_deployment.assert_called_once_with(

View File

@ -40,4 +40,10 @@ QinlingGroup = [
choices=['public', 'admin', 'internal', choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'], 'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for the qinling service."), help="The endpoint type to use for the qinling service."),
cfg.StrOpt("python_runtime_image",
default="openstackqinling/python-runtime:0.0.2",
help="The Python runtime being used in the tests."),
cfg.StrOpt("nodejs_runtime_image",
default="openstackqinling/nodejs-runtime:0.0.1",
help="The NodeJS runtime being used in the tests."),
] ]

View File

@ -11,14 +11,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from tempest import config
from tempest.lib import decorators from tempest.lib import decorators
from qinling_tempest_plugin.tests import base from qinling_tempest_plugin.tests import base
CONF = config.CONF
class NodeJSExecutionsTest(base.BaseQinlingTest): class NodeJSExecutionsTest(base.BaseQinlingTest):
name_prefix = 'NodeJSExecutionsTest' name_prefix = 'NodeJSExecutionsTest'
image = 'openstackqinling/nodejs-runtime' image = CONF.qinling.nodejs_runtime_image
def setUp(self): def setUp(self):
super(NodeJSExecutionsTest, self).setUp() super(NodeJSExecutionsTest, self).setUp()

View File

@ -27,7 +27,7 @@ CONF = config.CONF
class BaseQinlingTest(test.BaseTestCase): class BaseQinlingTest(test.BaseTestCase):
credentials = ('admin', 'primary', 'alt') credentials = ('admin', 'primary', 'alt')
create_runtime = True create_runtime = True
image = 'openstackqinling/python-runtime' image = CONF.qinling.python_runtime_image
@classmethod @classmethod
def skip_checks(cls): def skip_checks(cls):