Scheduled maintenance on Saturday, 27 September 2025, from 07:00 AM to 4:00 PM GMT (09:00 AM to 6:00 PM CEST) - some services may be unavailable -

Skip to content
Snippets Groups Projects
Select Git revision
  • e1775098207c35bdc65b51cfa4ace3fd6bd3491f
  • master default
  • feat/320-cttc-ietf-simap-basic-support-with-kafka-yang-push
  • cnit_tapi
  • feat/292-cttc-implement-integration-test-for-ryu-openflow
  • feat/314-tid-new-service-for-ipowdm-configuration-fron-orchestrator-to-ipowdm-controller
  • feat/327-tid-new-service-to-ipowdm-controller-to-manage-transceivers-configuration-on-external-agent
  • cnit-p2mp-premerge
  • feat/325-tid-nbi-e2e-to-manage-e2e-path-computation
  • feat/307-update-python-version-service
  • feat/326-tid-external-management-of-devices-telemetry-nbi
  • openroadm-flex-grid
  • feat/310-cttc-implement-nbi-connector-to-interface-with-osm-client
  • develop protected
  • feat/324-tid-nbi-ietf_l3vpn-deploy-fail
  • feat/321-add-support-for-gnmi-configuration-via-proto
  • feat/322-add-read-support-for-ipinfusion-devices-via-netconf
  • feat/323-add-support-for-restconf-protocol-in-devices
  • feat/policy-refactor
  • feat/192-cttc-implement-telemetry-backend-collector-gnmi-openconfig
  • feat/307-update-python-version
  • feat/telemetry-collector-int
  • v5.0.0 protected
  • v4.0.0 protected
  • demo-dpiab-eucnc2024
  • v3.0.0 protected
  • v2.1.0 protected
  • v2.0.0 protected
  • v1.0.0 protected
29 results

cockroachdb

  • Open with
  • Download source code
  • Download directory
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.

    CockroachDB configuration preparation

    These steps reproduce how to generate Cockroach manifest files used in TeraFlowSDN and apply them to MicroK8s. For stability reasons, we fix the versions providing the manifest files. In future releases of TeraFlowSDN, we might consider dynamically downloading and modifying the files.

    Steps:

    DEPLOY_PATH="manifests/cockroachdb" OPERATOR_BASE_URL="https://raw.githubusercontent.com/cockroachdb/cockroach-operator/master"

    mkdir -p ${DEPLOY_PATH}

    Apply Custom Resource Definition for the CockroachDB Operator

    curl -o "

    DEPLOYPATH/crds.yaml""{DEPLOY_PATH}/crds.yaml" "
    {OPERATOR_BASE_URL}/install/crds.yaml" kubectl apply -f "${DEPLOY_PATH}/crds.yaml"

    Deploy CockroachDB Operator

    curl -o "

    DEPLOYPATH/operator.yaml""{DEPLOY_PATH}/operator.yaml" "
    {OPERATOR_BASE_URL}/install/operator.yaml" nano "${DEPLOY_PATH}/operator.yaml"

    - add env var: WATCH_NAMESPACE=%TFS_CRDB_NAMESPACE%

    sed s/%TFS_CRDB_NAMESPACE%/crdb/g ${DEPLOY_PATH}/operator.yaml >

    DEPLOYPATH/tfscrdboperator.yamlkubectlapplyf"{DEPLOY_PATH}/tfs_crdb_operator.yaml kubectl apply -f "
    {DEPLOY_PATH}/tfs_crdb_operator.yaml"

    Deploy CockroachDB

    curl -o "

    DEPLOYPATH/cluster.yaml""{DEPLOY_PATH}/cluster.yaml" "
    {OPERATOR_BASE_URL}/examples/example.yaml" nano "${DEPLOY_PATH}/cluster.yaml"

    - set version

    - set number of replicas

    kubectl create namespace crdb kubectl apply --namespace crdb -f "${DEPLOY_PATH}/cluster.yaml"

    Deploy CockroachDB Client

    curl -o "

    DEPLOYPATH/clientsecureoperator.yaml""{DEPLOY_PATH}/client-secure-operator.yaml" "
    {OPERATOR_BASE_URL}/examples/client-secure-operator.yaml" kubectl create --namespace crdb -f "${DEPLOY_PATH}/client-secure-operator.yaml"

    Add tfs user with admin rights

    kubectl exec -it cockroachdb-client-secure --namespace crdb -- ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public CREATE USER tfs WITH PASSWORD 'tfs123'; GRANT admin TO tfs;

    Expose CockroachDB SQL port (26257)

    PORT=

    There was an error rendering this math block. KaTeX parse error: Expected '}', got 'EOF' at end of input: …H='{"data": {"'
    {PORT}'": "crdb/cockroachdb-public:'
    There was an error rendering this math block. KaTeX parse error: Expected 'EOF', got '}' at position 9: {PORT}'"}̲}' kubectl patc…
    {PATCH}"

    PORT_MAP='{"containerPort": '

    PORT,"hostPort":{PORT}', "hostPort": '
    {PORT}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['
    There was an error rendering this math block. KaTeX parse error: Expected 'EOF', got '}' at position 13: {PORT_MAP}']}̲' PATCH='{"spec…
    {CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}"

    Expose CockroachDB Console port (8080)

    PORT=

    There was an error rendering this math block. KaTeX parse error: Expected '}', got 'EOF' at end of input: …H='{"data": {"'
    {PORT}'": "crdb/cockroachdb-public:'
    There was an error rendering this math block. KaTeX parse error: Expected 'EOF', got '}' at position 9: {PORT}'"}̲}' kubectl patc…
    {PATCH}"

    PORT_MAP='{"containerPort": '

    PORT,"hostPort":{PORT}', "hostPort": '
    {PORT}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['
    There was an error rendering this math block. KaTeX parse error: Expected 'EOF', got '}' at position 13: {PORT_MAP}']}̲' PATCH='{"spec…
    {CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}"