Skip to content

Commit e46f4ce

Browse files
added local raml file
1 parent 8bec302 commit e46f4ce

File tree

5 files changed

+404
-15
lines changed

5 files changed

+404
-15
lines changed

README.md

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,79 @@
11
# Data Cloud integration built in MuleSoft
22

3-
Temporary (?) place for the Data Cloud integration built using MuleSoft.
3+
Temporary (or not?) place for the Data Cloud integration built using MuleSoft.
44

5-
## Run locally
5+
There are two main folders/projects inside this repo:
6+
1. [Data Cloud Integration API/](/Data%20Cloud%20Integration%20API/) ~ Contains the files I used to publish the **API Specification** that is publicly available in my Exchange Portal [here](https://anypoint.mulesoft.com/exchange/portals/mulesoft-36559/b903eebf-16e9-46c5-8992-bffd66c2306c/data-cloud-integration-api/).
7+
2. [data-cloud-integration-impl/](/data-cloud-integration-impl/) ~ Contains the Mule project I created for you to call Data Cloud. This is the code used to generate the JAR file that you will use to deploy the Mule app in Anypoint Platform. You can download the latest JAR from the `releases` section of this repo or by clicking [here](https://github.com/alexandramartinez/datacloud-mulesoft-integration/releases/download/1.0.0/data-cloud-integration-impl-1.0.0-mule-application.jar).
68

7-
TBD
9+
## Data Cloud configuration
10+
11+
tbd
12+
13+
## Deploy your own Mule app
14+
15+
Before starting, make sure you have all the Data Cloud settings ready.
16+
17+
- Download the Mule app's JAR file [here](https://github.com/alexandramartinez/datacloud-mulesoft-integration/releases/download/1.0.0/data-cloud-integration-impl-1.0.0-mule-application.jar).
18+
- Take note of the following credentials. You will need them for the Mule app.
19+
- `salesforce.username` - The username you use to log in to Salesforce at login.salesforce.com
20+
- `salesforce.password` - The password you use to log in to Salesforce at login.salesforce.com
21+
- `cdp.consumer.key` - The Consumer Key for the Connected App you created in Salesforce
22+
- `cdp.consumer.secret` - The Consumer Secret for the Connected App you created in Salesforce
23+
- Create a free trial account in [Anypoint Platform](https://anypoint.mulesoft.com). It will expire in 30 days but you can create a new one using the same details to register, just making sure to change the username to a different one.
24+
- In Anypoint Platform, navigate to [Runtime Manager](https://anypoint.mulesoft.com/cloudhub).
25+
- Click on **Deploy Application**.
26+
- Add any **application name**. For example, `data-cloud-integration`
27+
- We will be deploying to CloudHub 2.0, but if you're deploying to CloudHub 1.0, the application name has to be unique across all applications worldwide. If the application name is not available, you can add your username at the end to make it unique. For example, `data-cloud-integration-amartinez`.
28+
- Make sure the **deployment target** is set to CloudHub 2.0. It should be selected by default.
29+
- Select **Choose file > Upload File** under **Application File**
30+
- Select the JAR file you downloaded at the beginning, or get it from this repo's [releases](https://github.com/alexandramartinez/datacloud-mulesoft-integration/releases).
31+
- Check the following values are correctly set under **Runtime**
32+
33+
| field | value |
34+
| - | - |
35+
|
36+
| Use Edge Release Channel | ◻️ (unchecked)
37+
| Runtime Version | 4.4.0
38+
| Replica Count | 1
39+
| Replica size | 0.1 vCores
40+
| Deployment model | Rolling update
41+
| Run in Runtime Cluster Mode | ◻️ (unchecked)
42+
| Use Object Store V2 | ◻️ (unchecked)
43+
44+
- Leave everything unchecked under the **Ingress** tab.
45+
- Add your credentials under **Properties**.
46+
- You can add them one by one using the **Table view**
47+
- Or upload the following text using the **Text view** and replace your values
48+
49+
```properties
50+
salesforce.username=your_username
51+
salesforce.password=your_password
52+
cdp.consumer.key=your_key
53+
cdp.consumer.secret=your_secret
54+
```
55+
56+
- Click on **Protect** next to each value from the **Table view** to hide your properties (only available in CloudHub 2.0).
57+
- Click on **Deploy Application**. Wait for a few minutes until your application has been deployed 🟢 (green circle).
58+
- If you see a 🔴 red circle right after clicking **Deploy**, wait more time. It doesn't mean the app has failed, it means it's still deploying.
59+
- Once the app has been deployed, click on **Dashboard** tab at the left side of the screen.
60+
- Copy the URL. This is your host URL. It should be something like `https://data-cloud-integration-abcdef123.a1b2c3-1.usa-e2.cloudhub.io/`
61+
62+
> [!CAUTION]
63+
> **DO NOT** share this URL publicly. Anyone with this URL will be able to access your Data Cloud API.
64+
>
65+
> If you wish to create a new URL, you will have to delete this app from the **Settings** tab (where it says **Stop**) and create a new one following the same steps.
66+
>
67+
> You can also **Stop** and **Start** your app only when you are using it to avoid unwanted requests.
68+
69+
## Call your integration
70+
71+
tbd
872

973
## Create your own - step by step
1074

75+
There is no need for you to go through these steps if you only want to make use of the integration. This is only if you want to learn how to create this whole integration step by step. From designing the API specification to implementing the Mule project.
76+
1177
### 1. Create the API Specification and publish it to Exchange
1278

1379
> [!NOTE]

data-cloud-integration-impl/pom.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,6 @@
6060
<artifactId>log4j-core</artifactId>
6161
<version>2.17.1</version>
6262
</dependency>
63-
<dependency>
64-
<!-- This API is published here:
65-
https://anypoint.mulesoft.com/exchange/portals/mulesoft-36559/b903eebf-16e9-46c5-8992-bffd66c2306c/data-cloud-integration-api/
66-
-->
67-
<groupId>b903eebf-16e9-46c5-8992-bffd66c2306c</groupId>
68-
<artifactId>data-cloud-integration-api</artifactId>
69-
<version>1.0.0</version>
70-
<classifier>raml</classifier>
71-
<type>zip</type>
72-
</dependency>
7363
<dependency>
7464
<groupId>org.mule.modules</groupId>
7565
<artifactId>mule-apikit-module</artifactId>

data-cloud-integration-impl/src/main/mule/global.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
<http:listener-config name="data-cloud-integration-api-httpListenerConfig">
2323
<http:listener-connection host="${http.listener.host}" port="${http.listener.port}" />
2424
</http:listener-config>
25-
<apikit:config name="data-cloud-integration-api-config" api="resource::b903eebf-16e9-46c5-8992-bffd66c2306c:data-cloud-integration-api:1.0.0:raml:zip:data-cloud-integration-api.raml" outboundHeadersMapName="outboundHeaders" httpStatusVarName="httpStatus" />
25+
<apikit:config name="data-cloud-integration-api-config" api="data-cloud-integration-api.raml" outboundHeadersMapName="outboundHeaders" httpStatusVarName="httpStatus" />
2626
</mule>

0 commit comments

Comments
 (0)