Exemple #1
0
def deploy_scality_storage(deploy_options):
    docs = utils.load_yaml_file_docs('deploy/s3/scality-storage.yaml')

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    log.info('Updating pvc size for scality-pv-claim')
    pvc_size_utils.update_size_in_yaml_docs(
        target=deploy_options.target,
        ns=deploy_options.namespace,
        profile=deploy_options.profile,
        name='scality-pv-claim',
        docs=docs
    )

    dst_file = utils.dump_yaml_file_docs(
        basename=f'build/{deploy_options.namespace}/scality-storage.yaml',
        docs=docs
    )

    log.info('Deploying %s', dst_file)
    utils.apply(
        target=deploy_options.target,
        namespace=deploy_options.namespace,
        profile=deploy_options.profile,
        file=dst_file
    )
def deploy_postgres_storage(deploy_options):
    docs = utils.load_yaml_file_docs('deploy/postgres/postgres-storage.yaml')

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    log.info('Updating pvc size for postgres-pv-claim')
    pvc_size_utils.update_size_in_yaml_docs(
        target=deploy_options.target,
        ns=deploy_options.namespace,
        name='postgres-pv-claim',
        docs=docs
    )

    dst_file = utils.dump_yaml_file_docs(
        basename=f'build/{deploy_options.namespace}/postgres-storage.yaml',
        docs=docs
    )

    if not deploy_options.apply_manifest:
        return
    log.info('Deploying %s', dst_file)
    utils.apply(
        target=deploy_options.target,
        namespace=deploy_options.namespace,
        file=dst_file
    )
def deploy_postgres(deploy_options):
    docs = utils.load_yaml_file_docs('deploy/postgres/postgres-deployment.yaml')

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    dst_file = utils.dump_yaml_file_docs('build/postgres-deployment.yaml', docs)

    log.info('Deploying %s', dst_file)
    utils.apply(dst_file)
def deploy_wiremock(deploy_options):
    docs = utils.load_yaml_file_docs(
        'deploy/wiremock/wiremock-deployment.yaml')
    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)
    dst_file = utils.dump_yaml_file_docs('build/wiremock-deployment.yaml',
                                         docs)

    log.info('Deploying %s', dst_file)
    utils.apply(target=deploy_options.target,
                namespace=deploy_options.namespace,
                file=dst_file)
def deploy_scality(deploy_options):
    docs = utils.load_yaml_file_docs('deploy/s3/scality-deployment.yaml')

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    dst_file = utils.dump_yaml_file_docs(
        basename=f'build/{deploy_options.namespace}/scality-deployment.yaml',
        docs=docs)

    log.info('Deploying %s', dst_file)
    utils.apply(target=deploy_options.target,
                namespace=deploy_options.namespace,
                file=dst_file)
Exemple #6
0
def deploy_postgres_secret(deploy_options):
    docs = utils.load_yaml_file_docs('deploy/postgres/postgres-secret.yaml')

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    dst_file = utils.dump_yaml_file_docs(
        basename=f'build/{deploy_options.namespace}/postgres-secret.yaml',
        docs=docs)

    log.info('Deploying %s', dst_file)
    utils.apply(target=deploy_options.target,
                namespace=deploy_options.namespace,
                profile=deploy_options.profile,
                file=dst_file)
def deploy_postgres_storage(deploy_options):
    docs = utils.load_yaml_file_docs('deploy/postgres/postgres-storage.yaml')

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    log.info('Updating pvc size for postgres-pv-claim')
    pvc_size_utils.update_size_in_yaml_docs(
        ns=deploy_options.namespace,
        name='postgres-pv-claim',
        docs=docs
    )

    dst_file = utils.dump_yaml_file_docs('build/postgres-storage.yaml', docs)

    log.info('Deploying %s', dst_file)
    utils.apply(dst_file)
Exemple #8
0
def deploy_postgres(deploy_options):
    postgres_dep_file = 'deploy/postgres/postgres-deployment.yaml'
    if deploy_options.target == utils.OCP_TARGET:
        postgres_dep_file = 'deploy/postgres/postgres-deployment-ephemeral.yaml'
    docs = utils.load_yaml_file_docs(postgres_dep_file)

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    dst_file = utils.dump_yaml_file_docs(
        basename=f'build/{deploy_options.namespace}/postgres-deployment.yaml',
        docs=docs)

    log.info('Deploying %s', dst_file)
    utils.apply(target=deploy_options.target,
                namespace=deploy_options.namespace,
                profile=deploy_options.profile,
                file=dst_file)
def deploy_postgres(deploy_options):
    postgres_dep_file = 'deploy/postgres/postgres-deployment.yaml'
    if not deploy_options.persistent_storage:
        postgres_dep_file = 'deploy/postgres/postgres-deployment-ephemeral.yaml'
    docs = utils.load_yaml_file_docs(postgres_dep_file)

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    dst_file = utils.dump_yaml_file_docs(
        basename=f'build/{deploy_options.namespace}/postgres-deployment.yaml',
        docs=docs
    )

    if not deploy_options.apply_manifest:
        return

    log.info('Deploying %s', dst_file)
    utils.apply(
        target=deploy_options.target,
        namespace=deploy_options.namespace,
        file=dst_file
    )
Exemple #10
0
def deploy_object_store_pvc(deploy_options):
    docs = utils.load_yaml_file_docs('deploy/s3/pvc.yaml')

    utils.set_namespace_in_yaml_docs(docs, deploy_options.namespace)

    log.info('Updating size for object storage pvc')
    pvc_size_utils.update_size_in_yaml_docs(
        target=deploy_options.target,
        ns=deploy_options.namespace,
        name='object-store',
        docs=docs
    )

    dst_file = utils.dump_yaml_file_docs(
        basename=f'build/{deploy_options.namespace}/object-storage-pvc.yaml',
        docs=docs
    )

    log.info('Deploying %s', dst_file)
    utils.apply(
        target=deploy_options.target,
        namespace=deploy_options.namespace,
        file=dst_file
    )