Skip to content

Commit 8ca3c63

Browse files
authored
Merge pull request #45 from rishisuresh7/upgrade-boomi-connector
Upgrade boomi connector
2 parents e9c3ba8 + 868671a commit 8ca3c63

File tree

7 files changed

+81
-10
lines changed

7 files changed

+81
-10
lines changed

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ dependencies {
3232
exclude group: 'com.boomi.connsdk', module: 'connector-sdk-api'
3333
exclude group: 'com.boomi.util', module: 'boomi-util'
3434
}
35-
testImplementation "org.junit.jupiter:junit-jupiter:5.5.2"
35+
testImplementation "org.junit.jupiter:junit-jupiter:5.6.2"
3636
testImplementation "io.pravega:pravega-standalone:${pravegaVersion}"
3737
testImplementation "com.boomi.connsdk:connector-sdk-test-util:${boomiConnectorVersion}"
3838
testImplementation "org.slf4j:slf4j-api:1.7.9"
3939
testImplementation "ch.qos.logback:logback-core:1.2.3"
4040
testRuntimeOnly "ch.qos.logback:logback-classic:1.2.3"
41+
testRuntimeOnly "com.google.guava:guava:31.1-jre"
4142
}
4243

4344
distributions {
@@ -50,6 +51,11 @@ distributions {
5051
from configurations.runtimeClasspath
5152
from jar
5253
}
54+
55+
// Exclude the jars that are available in the atom or those that are required for testing
56+
exclude("bcprov-ext-jdk15on-1.70.jar")
57+
exclude("guava-*.jar")
58+
exclude("slf4j*.jar")
5359
into '/'
5460
}
5561
}
@@ -74,4 +80,8 @@ licenseReport {
7480
test {
7581
useJUnitPlatform()
7682
systemProperties 'singlenode.configurationFile': project.file('src/test/resources/standalone-config.properties')
83+
84+
// Adjust heap size for running local pravega emulator during testing
85+
minHeapSize = "512m" // initial heap size
86+
maxHeapSize = "16384m" // maximum heap size
7787
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# boomi-pravega-connector
2+
A Pravega connector for the [Boomi Atomsphere](https://boomi.com/platform/integration/applications/)
3+
4+
## Pre-requisites
5+
- **Accounts**
6+
- A boomi platform account
7+
- **Tools**
8+
- Java 11
9+
- An SDP installation
10+
- kubectl client configured to access the SDP cluster
11+
- A docker installation for running boomi Atoms
12+
13+
14+
## Steps to configure Boomi Platform
15+
1. Create a boomi platform account and save the credentials
16+
2. Create a boomi environment on your boomi account. This environment will be used to test processes using the connector.
17+
3. Create a local boomi Atom using the official boomi Atom docker image. Use the following command to create a boomi Atom running inside docker
18+
- ```sh
19+
docker run --privileged -p 9090:9090 -h localhost -e BOOMI_USERNAME=<your-boomi-account-username> -e BOOMI_PASSWORD=<your-boomi-account-password> -e BOOMI_ACCOUNTID=<your-boomi-accountID> -e BOOMI_ATOMNAME="Pravega Boomi Atom" -e ATOM_LOCALHOSTID="Pravega Boomi Atom ID" -v /opt/boomi:/run:Z --rm -it boomi/atom:3.2.12
20+
```
21+
- This will run a local boomi Atom docker container on your machine
22+
4. On the boomi environments page, you should see a running boomi Atom named 'Pravega Boomi Atom' in the list of 'Unattached Atoms'. Click on the atom and attach it to the environment created earlier.
23+
24+
***Note:** Since SDP uses self-signed certificates across the installation, your local boomi Atom may not be able to connect to SDP Pravega. Either use valid a set of certificates or create a custom boomi Atom docker image with the mounted self-signed certificates. Refer to the [documentation](#create-a-custom-docker-image) on steps to generate a docker image.*
25+
26+
## Steps to create and upload a custom boomi connector to boomi platform
27+
- Please refer to the section 'Create a Custom Connector' under the [boomi connector](../README.md)
28+
29+
30+
## Steps to get details from SDP cluster to connect with boomi Platform
31+
- Create a project named `boomi`
32+
- Fetch SDP Pravega Endpoint
33+
- ```shell
34+
kubectl get ingress -n nautilus-pravega pravega-controller
35+
```
36+
- Output of the above command should give you a URL pointing to the pravega-controller
37+
- Fetch SDP Pravega Keycloak OIDC (Keycloak JSON)
38+
- ```shell
39+
kubectl get secrets -n boomi boomi-ext-pravega -o jsonpath='{.data.keycloak\.json}' | base64 -d
40+
```
41+
- The output of the above command to be used as the value for `Keycloak OIDC` in the boomi connector
42+
43+
## Steps to create process on boomi platform
44+
- Please refer to the [Getting Started Guide](Pravega%20Connector%20Getting%20Started%20Guide.md) for creating process on Boomi with boomi-pravega-connectors
45+
46+
## Create a custom docker image with self-signed certificates
47+
- Obtain the certificates you want to add to the Linux/JVM trust store
48+
- Place the certificates in the directory `/usr/share/ca-certificates`
49+
- Run `dpkg-reconfigure ca-certificates` (This may require you to have admin privileges)
50+
- Select the certificates you want to import
51+
- Once finished, the command will update the system-wide ca-bundle located at `/etc/ssl/certs/ca-bundle.crt`
52+
- Copy the ca-bundle to the same directory as your Dockerfile
53+
- Add the ca-bundle to your Dockerfile and move it to `/etc/ssl/certs/ca-bundle.crt`
54+
- ```shell
55+
COPY ca-bundle.crt .
56+
RUN mv ca-bundle.crt /etc/ssl/certs/ca-bundle.crt
57+
```
58+
- To update the JVM trust store, add the following command to your Dockerfile, this will update the java keystore in your docker image with the certificates provided
59+
- ```shell
60+
RUN keytool -importcert -keystore /usr/java/latest/lib/security/cacerts -storepass changeit -noprompt -trustcacerts -file /etc/ssl/certs/ca-bundle.crt
61+
```
62+
- Build the docker image!

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
releaseVersion=2.1.2
22

3-
pravegaVersion=0.8.0
4-
pravegaKeycloakVersion=0.8.0
5-
jsonPathVersion=2.4.0
3+
pravegaVersion=0.12.0
4+
pravegaKeycloakVersion=0.12.0
5+
jsonPathVersion=2.7.0
66
boomiUtilVersion=2.3.8
77
boomiCommonSdkVersion=1.1.9
88
boomiConnectorVersion=2.8.0

src/test/java/io/pravega/connector/boomi/PravegaBrowserTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ public void testTestConnectorSuccess() throws Exception {
144144
1. Must have access to an SDP cluster
145145
2. The expected scope must be created on the cluster
146146
3. The Pravega endpoint, scope, stream and keyclaok.json file path must be set in a properties file
147-
4. Must have a valid Keycloak JWT in your home directory
148147
*/
149148
@Test
150149
public void testTestNautilusConnector() throws Exception {

src/test/java/io/pravega/connector/boomi/PravegaOperationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ public void testWriteOperation() {
205205
}
206206

207207
@Test
208-
public void test2MBWriteOperation() {
209-
String json = TestUtils.generate2MBmessage();
208+
public void test1MBWriteOperation() {
209+
String json = TestUtils.generate1MBmessage();
210210
PravegaConnector connector = new PravegaConnector();
211211
ConnectorTester tester = new ConnectorTester(connector);
212212

src/test/java/io/pravega/connector/boomi/TestUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ static String generate9MBmessage() {
114114
return "{\"name\":\"foo\",\"message\":\"" + randomMessage + "\"}";
115115
}
116116

117-
static String generate2MBmessage() {
118-
char[] chars = new char[2000000];
117+
static String generate1MBmessage() {
118+
char[] chars = new char[1000000];
119119
Arrays.fill(chars, 'a');
120120
String randomMessage = new String(chars);
121121
return "{\"name\":\"foo\",\"message\":\"" + randomMessage + "\"}";

src/test/resources/test.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sdp_endpoint = "tcp://127.0.0.1:9090"
1+
sdp_endpoint = tcp://127.0.0.1:9090
22
sdp_auth_type = Keycloak
33
local_pravega_auth_type = None
44
interval = 10

0 commit comments

Comments
 (0)