From f136e8d7cf2590433cb4580cc3a5c9c7cc8562bc Mon Sep 17 00:00:00 2001 From: Xander Harris <40033629+xanderinfor@users.noreply.github.com> Date: Sun, 9 Sep 2018 12:22:46 -0700 Subject: [PATCH 1/4] "an individual databases" Changed to 'an individual database.' --- Tutorial-Run-the-console.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tutorial-Run-the-console.md b/Tutorial-Run-the-console.md index aca740d9..3eb5184e 100644 --- a/Tutorial-Run-the-console.md +++ b/Tutorial-Run-the-console.md @@ -6,7 +6,7 @@ search: # Running the OrientDB Console -Once the server is running there are various methods you can use to connect to your database server to an individual databases. Two such methods are the [Network Binary](Network-Binary-Protocol.md) and [HTTP/REST](OrientDB-REST.md) protocols. In addition to these OrientDB provides a command-line interface for connecting to and working with the database server. +Once the server is running there are various methods you can use to connect to your database server to an individual database. Two such methods are the [Network Binary](Network-Binary-Protocol.md) and [HTTP/REST](OrientDB-REST.md) protocols. In addition to these OrientDB provides a command-line interface for connecting to and working with the database server. ## Starting the OrientDB Console From 4c4356ec08e013974cdcd9882fc39a8e72e24ccc Mon Sep 17 00:00:00 2001 From: Xander Harris Date: Sun, 9 Sep 2018 13:12:25 -0700 Subject: [PATCH 2/4] CPUs to improve parallel processing. #1 --- Tutorial-Clusters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tutorial-Clusters.md b/Tutorial-Clusters.md index b46b034d..f50a6afc 100644 --- a/Tutorial-Clusters.md +++ b/Tutorial-Clusters.md @@ -32,7 +32,7 @@ CLUSTERS: ## Understanding Clusters -By default, OrientDB creates one cluster for each [Class](Concepts.md#class). Starting from v2.2, OrientDB automatically creates multiple clusters per each class (the number of clusters created is equals to the number of CPU's cores available on the server) to improve using of parallelism. All records of a class are stored in the same cluster, which has the same name as the class. You can create up to 32,767 (or, 215 - 1) clusters in a database. Understanding the concepts of classes and clusters allows you to take advantage of the power of clusters in designing new databases. +By default, OrientDB creates one cluster for each [Class](Concepts.md#class). Starting from v2.2, OrientDB automatically creates multiple clusters per each class (the number of clusters created is equal to the number of CPU cores available on the server) to improve parallel processing. All records of a class are stored in the same cluster, which has the same name as the class. You can create up to 32,767 (or, 215 - 1) clusters in a database. Understanding the concepts of classes and clusters allows you to take advantage of the power of clusters in designing new databases. While the default strategy is that each class maps to one cluster, a class can rely on multiple clusters. For instance, you can spawn records physically in multiple locations, thereby creating multiple clusters. From 93cf11313fb62900b715401e252c24e53a1bb39c Mon Sep 17 00:00:00 2001 From: Xander Harris Date: Sun, 9 Sep 2018 13:51:52 -0700 Subject: [PATCH 3/4] Record IDs. #1 --- Tutorial-Relationships.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tutorial-Relationships.md b/Tutorial-Relationships.md index aaa437a4..b74dc3fd 100644 --- a/Tutorial-Relationships.md +++ b/Tutorial-Relationships.md @@ -33,7 +33,7 @@ What happens here is a `JOIN`. That is, the contents of two tables are joined to ### 1-to-Many Relationship -Given that Relational databases have no concept of a collections, the `Customer` table cannot have multiple foreign keys. The only way to manage a 1-to-Many Relationship in databases of this kind is to move the Foreign Key to the `Address` table. +Given that Relational databases have no concept of collections, the `Customer` table cannot have multiple foreign keys. The only way to manage a 1-to-Many Relationship in databases of this kind is to move the Foreign Key to the `Address` table. ![RDBMS 1-to-N](http://www.orientdb.org/images/rdbms-1toN.jpg) @@ -88,7 +88,7 @@ When you have `Invoice` linked to `Customer`, then you have a pointer to `Custom ### Types of Relationships -In 1-to-N relationships, OrientDB handles the relationship as a collection of Record ID's, as you would when managing objects in memory. +In 1-to-N relationships, OrientDB handles the relationship as a collection of Record IDs, as you would when managing objects in memory. OrientDB supports several different kinds of relationships: From b4749a564fba9f0a0136ea999b03f640f632f975 Mon Sep 17 00:00:00 2001 From: Edward Harris Date: Thu, 25 Jul 2019 20:19:18 -0700 Subject: [PATCH 4/4] yep. --- Dockerfile | 7 ++++ Jenkinsfile | 94 +++++++++++++++++++++++++++++++---------------------- 2 files changed, 62 insertions(+), 39 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..e117a2d6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM jenkins/jnlp-slave:alpine + +USER root + +RUN apk update +RUN apk add nodejs npm +RUN npm install -g gitbook diff --git a/Jenkinsfile b/Jenkinsfile index 9380bf12..bffd4e9e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,43 +1,59 @@ -stage 'Generate docs for branch ${env.BRANCH_NAME}' -node("master") { - - properties([[$class: 'BuildDiscarderProperty', - strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', - artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10']]]) - - sh "rm -rf ./*" +def appNameLabel = "docker_ci" +def taskLabel = env.JOB_NAME +def containerName="docs-${env.BUILD_NUMBER}" +def gitbookImage - checkout scm - echo "building docs for branch ${env.BRANCH_NAME}" - - def containerName = env.JOB_NAME.replaceAll(/\//, "_") + - "_build_${currentBuild.number}" - - def appNameLabel = "docker_ci"; - def taskLabel = env.JOB_NAME.replaceAll(/\//, "_") - - lock("label": "memory", "quantity":2) { - docker.image("orientdb/jenkins-slave-gitbook:6.0.0").inside("--label collectd_docker_app=${appNameLabel} --label collectd_docker_task=${taskLabel}" + - " --name ${containerName} --memory=2g") { - sh "rm -rf _/book/*" - sh "gitbook install --gitbook 3.1.1 . " - sh "gitbook build --gitbook 3.1.1 ." - sh "gitbook pdf --gitbook 3.1.1 . _book/OrientDB-Manual.pdf" - } +ansiColor() { + node("worker") { + stage('checkout') { + checkout scm } - - if (!env.BRANCH_NAME.startsWith("PR-")) { - echo "sync generated content to OrientDB site" - lock("label": "memory", "quantity":2) { - docker.image("orientdb/jenkins-slave-rsync:20160503").inside("--label collectd_docker_app=${appNameLabel} --label collectd_docker_task=${taskLabel}" + - " --name ${containerName} --memory=2g -v /home/orient:/home/jenkins:ro") { - sh "rsync -ravh --stats _book/ -e ${env.RSYNC_DOC}/${env.BRANCH_NAME}/" - } - } - } else { - echo "it's a PR, no sync required" + stage("building docs for branch ${env.BRANCH_NAME}") { + withCredentials([ + usernamePassword(credentialsId: 'gcr:xander-the-harris-jenkins', + passwordVariable: 'gcr_pass', + usernameVariable: 'gcr_user') + ]) { + docker.withRegistry('https://gcr.io', 'gcr:xander-the-harris-jenkins') { + gitbookImage=docker.build('gcr.io/xander-the-harris-jenkins/agent.gitbook') + gitbookImage.push("v${env.BUILD_NUMBER}") + } + } } - + // stage('build the gitbook') { + // gitbookImage.inside($/ -v ${env.WORKSPACE}:/gitbook + // --name ${containerName}/$ + // ) { + // // gitbook install --gitbook 3.1.1 . + // // gitbook build --gitbook 3.1.1 . + // // gitbook pdf --gitbook 3.1.1 . _book/OrientDB-Manual.pdf + // echo("good enough") + // } + // stage('archive') { + // archiveArtifacts('*file') + // } + // // if (!env.BRANCH_NAME.startsWith("PR-")) { + // // docker.image( + // // "orientdb/jenkins-slave-rsync:20160503").inside($/ + // // --label collectd_docker_app=${appNameLabel} \ + // // --label collectd_docker_task=${taskLabel} \ + // // --name ${containerName} \ + // // --memory=2g \ + // // -v /home/orient:/home/jenkins:ro + // // /$ + // // ) { + // // echo( + // // sh(label: 'rsync', + // // script: $/ + // // rsync -ravh --stats _book/ -e ${env.RSYNC_DOC}/${env.BRANCH_NAME}/ + // // /$, + // // returnStdout: true + // // ) + // // ) + // // } + // // } else { + // // echo("it's a PR, no sync required") + // // } + // } + } } - -