Skip to content

Commit b992be9

Browse files
mlreric-schneider
andauthored
Updates for unified build (#176)
--------- Co-authored-by: Eric Schneider <[email protected]>
1 parent 2422e62 commit b992be9

22 files changed

+685
-186
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Draft
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
dispatch-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Determine the build branch and draft branch for dispatch.
14+
- name: Determine Dispatch Parameters
15+
run: |
16+
if [ "${{ github.event_name }}" == "pull_request" ]; then
17+
# If this workflow is kicked off by a pull request, build
18+
# a draft using the pull request base branch and PR branch.
19+
build_branch="${{ github.base_ref }}"
20+
draft_branch="${{ github.event.pull_request.head.ref }}"
21+
else
22+
if [ "$(basename ${{ github.event.ref }})" == "stage" ]; then
23+
# This was a merge to stage so kick off a build to update stage draft.
24+
build_branch=stage
25+
draft_branch=stage
26+
else
27+
# Otherwise this is a push to one of the source branches so
28+
# dispatch a build for the main draft to pick up the changes.
29+
build_branch=main
30+
draft_branch=main
31+
fi
32+
fi
33+
echo "build_branch=$build_branch" >> $GITHUB_OUTPUT
34+
echo "draft_branch=$draft_branch" >> $GITHUB_OUTPUT
35+
id: branches
36+
37+
- name: Deploy Draft
38+
uses: convictional/[email protected]
39+
with:
40+
owner: riptano
41+
repo: datastax-docs-site
42+
github_token: ${{ secrets.DISPATCH_GITHUB_TOKEN }}
43+
github_user: ${{ secrets.DISPATCH_GITHUB_USER }}
44+
workflow_file_name: deploy-draft.yml
45+
client_payload: '{ "build_repository": "${{ github.event.repository.full_name }}", "build_branch": "${{ steps.branches.outputs.build_branch }}", "draft_branch": "${{ steps.branches.outputs.draft_branch }}", "pull_request_number": "${{ github.event.pull_request.number }}" }'

docs/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#OS
2+
**/.DS_Store
3+
**/.git-credentials
4+
5+
#IDE
6+
**/.vscode/
7+
**/.idea
8+
**/*.iml
9+
*.http
10+
**/.java-version
11+
12+
#build
13+
**/package-lock.json
14+
**/node_modules/
15+
/build/

docs/README.adoc

Lines changed: 135 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,159 @@
1-
= DataStax CDC for Apache Cassandra documentation
1+
= {company} {product} Docs
2+
// Variables:
3+
:company: DataStax
4+
:product: CDC for Apache Cassandra
5+
:repo-name: cdc-apache-cassandra
6+
:github-org: datastax
7+
// Settings:
8+
:toc: macro
9+
:!example-caption:
10+
:experimental:
11+
:hide-uri-scheme:
12+
ifdef::env-github[]
13+
:icons: font
14+
:toclevels: 1
15+
:toc-title: Contents
16+
:tip-caption: :bulb:
17+
:note-caption: :information_source:
18+
:important-caption: :heavy_exclamation_mark:
19+
:caution-caption: :fire:
20+
:warning-caption: :warning:
21+
:badges:
22+
endif::[]
23+
// Project URLs:
24+
:url-github-org: https://github.com/{github-org}
25+
:url-project-repo: {url-github-org}/{repo-name}
26+
:url-ui-repo: https://github.com/riptano/docs-ui
27+
:url-playbook-repo: https://github.com/riptano/datastax-docs-site
28+
:url-contribute:
29+
:url-datastax: https://datastax.com
30+
:url-datastax-docs: https://docs.datastax.com
31+
:url-docs-preview: http://docs-preview.datastax.com
32+
// External URLs:
33+
:asciidoc-language: https://docs.asciidoctor.org/asciidoc/latest/
234

3-
This repo contains the source files for the {csc_pulsar_first} documentation.
35+
This repository contains the source files for the {company} {product} documentation.
436

5-
The docs are written in asciidoc and use Antora to generate the output.
37+
toc::[]
638

7-
== Dependencies
39+
== Get started
840

9-
Antora requires NodeJS. Install NodeJS, then update project dependencies:
41+
The documentation is written in {asciidoc-language}[AsciiDoc]-formatted source files located in the `modules` directory.
1042

11-
[source,bash]
12-
----
13-
brew install node
14-
----
43+
=== Make a simple update
1544

16-
Install Antora:
45+
For simple updates like fixing typos or modifying existing prose, it's easiest to edit the source files directly on GitHub.
1746

18-
[source,bash]
19-
----
20-
npm i -g @antora/[email protected] @antora/[email protected]
21-
----
47+
NOTE: You'll need Write privileges on the repository to edit files directly on GitHub.
2248

23-
== Create the antora config file
49+
. Find the file you want to edit in the `modules` directory.
2450

25-
Generate the antory.yaml file using the project version:
51+
. Click the *Edit* icon in the upper-right corner of the file view.
2652

27-
[source,bash]
53+
. Make your changes in the editor.
54+
55+
. Click *Commit changes...*
56+
57+
. Enter a description for your commit and click *Propose changes*.
58+
59+
. On the *Open a pull request* screen, enter a title and description for your change, assign reviewers, then click *Create pull request*.
60+
61+
. Once the pull request is open, an automatic draft preview build is triggered.
62+
Once complete, the build system posts a comment on the pull request with a link to the draft site for you to preview your changes.
63+
64+
=== Edit docs locally
65+
66+
If you need to make substantial updates to the documentation, you'll want to clone the repository so you can work with the source files locally.
67+
68+
. Clone this repository
69+
+
70+
[source,bash,subs="attributes"]
2871
----
29-
./gradlew docs:antoraConfig
72+
git clone {url-project-repo}.git
3073
----
3174

32-
== Generating and viewing the HTML output locally
75+
. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic[Create a _classic_ personal access token] for your GitHub account.
76+
When configuring the token, set the *Expiration* to at least 90 days and select everything under the *Repo* https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes[scope].
77+
+
78+
[IMPORTANT]
79+
====
80+
Copy your personal access token to a temporary location -- you'll need it later.
81+
====
82+
83+
. https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on[Authorize your personal access token] so that it can access repositories in the Riptano and DataStax organizations in GitHub.
84+
85+
. https://docs.antora.org/antora/latest/playbook/private-repository-auth/#populate-credentials-directly[Populate the credential store] with your personal access token.
86+
For most people this means doing the following:
87+
+
88+
.. Create the file `$HOME/.git-credentials` and open it in your editor.
89+
.. Add the following line:
90+
+
91+
[source,subs="verbatim,quotes"]
92+
----
93+
https://**TOKEN**:@github.com
94+
----
95+
+
96+
Replace *`TOKEN`* with the personal access token you copied from GitHub.
97+
.. Save and close the file.
3398

34-
The docs can be generated locally during development, to check work.
99+
. If you don't already have Node.js installed, do the following:
35100

101+
.. Install https://github.com/nvm-sh/nvm[nvm].
102+
+
103+
If you're on macOS, you can install nvm using https://brew.sh/[Homebrew]:
104+
+
36105
[source,bash]
37106
----
38-
npm run build:local
107+
brew install nvm
39108
----
40109

41-
Output files are located in the build/site directory.
42-
43-
== Publishing the HTML output
110+
.. Use nvm to install Node.js.
111+
+
112+
[source,bash]
113+
----
114+
nvm install --lts
115+
----
116+
+
117+
[source,bash]
118+
----
119+
nvm use --lts
120+
----
121+
+
122+
[source,bash]
123+
----
124+
nvm alias default node
125+
----
44126

45-
To generate files for publishing:
127+
. Install the project dependencies.
128+
+
129+
[source,bash,subs="attributes"]
130+
----
131+
cd {repo-name}/docs
132+
----
133+
+
134+
[source,bash]
135+
----
136+
npm install
137+
----
46138

139+
. Build the site.
140+
+
47141
[source,bash]
48142
----
49-
npm run build:publish
143+
npm run build:local
50144
----
145+
+
146+
If the build was successful, you'll see the following output in your terminal:
147+
+
148+
[source,console,subs="attributes"]
149+
----
150+
Site generation complete!
151+
Open file:///Users/USERNAME/repos/{repo-name}/build/site/index.html in a browser to view your site.
152+
----
153+
+
154+
To view the site, paste the entire `\file:///` path into your browser's address bar and press kbd:[Return].
155+
156+
[#publish-docs]
157+
== Publish docs
158+
159+
To learn how to publish documentation to {url-datastax-docs}, see the {url-playbook-repo}#deploy-production[datastax-docs-site README].

docs/docs-src/core/antora-cdc-cassandra.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/docs-src/core/antora.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/docs-src/core/antora.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: cdc-for-cassandra
2+
title: DataStax CDC for Apache Cassandra
3+
version: '2.2.9'
4+
display_version: '2.2.9'
5+
start_page: index.adoc
6+
asciidoc:
7+
attributes:
8+
cdc_cass_first: 'DataStax CDC for Apache Cassandra(R)'
9+
cdc_cass: 'CDC for Cassandra'
10+
csc_pulsar_first: 'DataStax Cassandra Source Connector for Apache Pulsar(TM)'
11+
csc_pulsar: 'CSC for Pulsar'
12+
cdc_pulsar: 'CDC for Cassandra'
13+
luna_version: '2.10'
14+
pulsar_version: '2.10'
15+
version: '2.2.9' # cdc-apache-cassandra latest {version}
16+
nav:
17+
- modules/ROOT/nav.adoc

docs/docs-src/core/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
* xref:backfill-cli.adoc[]
55
* xref:faqs.adoc[]
66
* xref:cdc-cassandra-events.adoc[]
7+
* xref:stringMappings.adoc[]
78
* xref:cdcExample.adoc[]

docs/docs-src/core/modules/ROOT/pages/index.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= About {cdc_cass}
22

33
{cdc_cass_first} is open-source software (OSS) that sends Cassandra mutations
4-
for tables having Change Data Capture (CDC) enabled to https://www.datastax.com/products/luna-streaming[Luna Streaming] or https://pulsar.apache.org/[Apache Pulsar], which in turn can write the data to platforms such as Elasticsearch® or Snowflake®.
4+
for tables having Change Data Capture (CDC) enabled to https://www.datastax.com/products/luna-streaming[Luna Streaming] or https://pulsar.apache.org/[Apache Pulsar(TM)], which in turn can write the data to platforms such as Elasticsearch(R) or Snowflake(R).
55

66
== Key Features
77

@@ -85,12 +85,12 @@ For each update to the table, an MD5 digest is calculated to de-duplicate the up
8585
[#supported-databases]
8686
== Supported databases
8787

88-
* Apache Cassandra® 3.11.x and 4.x databases
88+
* Apache Cassandra(R) 3.11.x and 4.x databases
8989
* Datastax Server Enterprise 6.8.16+
9090

9191
== Supported Cassandra data structures
9292

93-
The following CQL data types are encoded as AVRO logical types:
93+
The following CQL data types are encoded as AVRO logical types:
9494

9595
* ascii (string)
9696
* bigint (long)
@@ -134,7 +134,7 @@ If a row update contains both supported and unsupported data types, the event wi
134134

135135
{cdc_cass} has the following limitations:
136136

137-
* Does not manage table truncates. The `TRUNCATE [TABLE]` command should not be used.
137+
* Does not manage table truncates. The `TRUNCATE [TABLE]` command should not be used.
138138
* Does not sync data available before starting the CDC agent.
139139
* Does not replay logged batches.
140140
* Does not manage time-to-live.

0 commit comments

Comments
 (0)