Skip to content

Commit a583042

Browse files
Merge pull request #380 from AmericaSCORESBayArea/sandbox
Resolve 3 issues: coach sessions NPE (#376), stats fields patch (#379), CI/CD vCore reset fix (#377); update README (#368)
2 parents c5eedee + d7291d8 commit a583042

File tree

6 files changed

+166
-240
lines changed

6 files changed

+166
-240
lines changed

.github/workflows/on-push-build-and-deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ jobs:
125125
-Dslack.client_id="${{ secrets.SLACK_CLIENT_ID }}" \
126126
-Dslack.client_secret="${{ secrets.SLACK_CLIENT_SECRET }}" \
127127
-Dslack.enabled=true \
128-
-DworkerType=MEDIUM \
129-
-Dworkers=1 \
130128
-DskipTests
131129
132130

.github/workflows/production-on-push-build-and-deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ jobs:
125125
-Dslack.client_id="${{ secrets.SLACK_CLIENT_ID }}" \
126126
-Dslack.client_secret="${{ secrets.SLACK_CLIENT_SECRET }}" \
127127
-Dslack.enabled=true \
128-
-DworkerType=MEDIUM \
129-
-Dworkers=1 \
130128
-DskipTests
131129
132130

README.md

Lines changed: 105 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Our core Mulesoft app was built to interact with Scores data in Salesforce datab
1010
### 🕺 [Postman Collection (API Documentation)](https://github.com/AmericaSCORESBayArea/salesforce-data-api/blob/master/docs/Scores%20-%20Salesforce%20Data%20API.postman_collection.json)
1111

1212
---
13-
# Development and Testing the app
13+
## Development and Testing the app
1414

1515
For development and testing purposes, we have 2 IDEs:
1616
1) [Anypoint Code Builder](https://www.mulesoft.com/platform/api/anypoint-code-builder) (based on VS Code)
@@ -74,7 +74,7 @@ mv keystore.jks `/src/main/resources`
7474

7575
9. Run the project using VS Code Start button (`Debug Mule Application`). Ta-da! 🚀
7676

77-
### ☁️ What if I want to run a cloud instance?
77+
## ☁️ What if I want to run a cloud instance?
7878

7979
1. Create [Anypoint Platform Account](https://anypoint.mulesoft.com/login/)
8080
2. Go to [the main dashboard](https://anypoint.mulesoft.com/)
@@ -83,11 +83,39 @@ mv keystore.jks `/src/main/resources`
8383
5. Click `Launch` button (if it's greyed out, refresh the page and wait)
8484
6. Wait for the environment to get allocated and load. The first time it might take a while
8585

86-
## Anypoint Studio Setup
86+
## Anypoint Studio Project Setup Guide
87+
88+
Follow the steps below to set up and run the **salesforce-data-api** MuleSoft project in **Anypoint Studio**.
89+
90+
91+
📅 1. Download Anypoint Studio
92+
93+
Download and install Anypoint Studio from the official site:
94+
95+
🔗 [Anypoint Studio](https://www.mulesoft.com/lp/dl/anypoint-mule-studio)
96+
97+
98+
🧬 2. Clone the Repository
99+
Clone the repository:
100+
```
101+
salesforce-data-api
102+
```
103+
104+
105+
🔀 3. Switch to Mule Perspective
106+
107+
Click on the **Mule Perspective** icon (next to Git) to switch your view for Mule development.
108+
109+
💠 4. Create `local.properties` File
110+
111+
Create a file named `local.properties` inside:
112+
113+
```
114+
src/main/resources/properties/
115+
```
116+
117+
Add the following configuration (get sandbox credentials from America SCORES team):
87118

88-
1. Download [Anypoint Studio](https://www.mulesoft.com/lp/dl/anypoint-mule-studio)
89-
2. Clone the repository and import the folder (`salesfroce-data-api`) WITHOUT copying the content to Studio's workspace
90-
3. Create `local.properties` file in the `src/main/resources/properties` folder (reach out to someone from America SCORES to get Sandbox properties):
91119
```properties
92120
http.listener.host=0.0.0.0
93121
http.listener.port=8091
@@ -96,7 +124,7 @@ fullDomain=0.0.0.0:8091
96124
api.id=
97125
keystore.key.password=
98126
keystore.password=
99-
127+
100128
sfdc.user=
101129
sfdc.url=
102130
sfdc.tkn=
@@ -111,34 +139,86 @@ slack.client_id=
111139
slack.client_secret=
112140
```
113141

114-
5. Configure Runtime
115-
- Right click on the project and select "Run As" -> "Run Configurations..."
116-
- Create a new configuration under "Mule Applications"
117-
- Select the project to launch: `salesforce-data-api`
118-
- Scroll down, click "Install Runtime" and install `Mule Server 4.6.X`. Once installed and the Studio is restarted (you can trace progress at the right bottom), go back to the menu and select the correct Mule server
119-
- Click "Apply"
120-
- Switch to 'Arguments' and add `-M-Denv=local`, `-Duser.timezone=UTC` and `-M-Danypoint.platform.gatekeeper=disabled` to VM arguments
121-
- Click "Apply"
122-
- Switch to 'JRE' and make sure that 17+ version is selected
123-
- Close configurations window
142+
---
143+
⚙️ 5. Configure Mule Runtime
124144

125-
6. Install Java seperately (depends on the system, visit https://www.java.com)
126-
7. Using terminal, generate the a new key pair (public and private keys) and a self-signed certificate (required for HTTPS, even for local) AND move it to `./src/main/resources` folder:
145+
1. Right-click the project → `Run As``Run Configurations...`
146+
2. Create a new config under **Mule Applications**
147+
3. Set project to launch: `salesforce-data-api`
148+
4. Scroll down and click **Install Runtime**
149+
150+
* Select and install: `Mule Server 4.6.X`
151+
* Restart Studio if prompted
152+
5. Select the installed **Mule Server 4.6.X**
153+
6. Click **Apply**
154+
155+
Add VM Arguments (under **Arguments** tab):
156+
157+
```text
158+
-M-Denv=local
159+
-Duser.timezone=UTC
160+
-M-Danypoint.platform.gatekeeper=disabled
127161
```
162+
163+
**Set Java Version (under **JRE** tab)**:
164+
165+
* Ensure Java **11 or 17+** is selected
166+
167+
Click **Apply** and close the config window.
168+
169+
☕ 6. Verify Runtime & Java Versions
170+
171+
* Mule Runtime: **4.6.X**
172+
* Java: **11 or 17+**
173+
174+
If the Mule runtime is not 4.6.x, you can install the correct version during step 5.
175+
176+
177+
🔐 7. Install Java (if not present)
178+
179+
Install Java from the official site:
180+
🔗 [https://www.java.com/](https://www.java.com)
181+
182+
---
183+
184+
🗑️ 8. Generate Keystore and Certificate
185+
186+
Use your terminal or CMD to run the following command in the **project root directory**:
187+
188+
```bash
128189
keytool -genkeypair -keystore keystore.jks \
129190
-dname "CN=localhost, OU=Unknown, O=America SCORES Bay Area, L=San Francisco, ST=California, C=US" \
130-
-keypass $YOUR_KEYPASS_PASSWORD$ \
131-
-storepass $YOUR_STOREPASS_PASSWORD$ \
191+
-keypass YOUR_KEYPASS_PASSWORD \
192+
-storepass YOUR_STOREPASS_PASSWORD \
132193
-keyalg RSA \
133194
-sigalg SHA256withRSA \
134195
-keysize 2048 \
135196
-alias mule \
136197
-ext SAN=DNS:localhost,IP:127.0.0.1 \
137198
-validity 9999
199+
```
138200

139-
mv keystore.jks `/src/main/resources`
201+
Then move the file:
202+
203+
```bash
204+
mv keystore.jks src/main/resources/
140205
```
141-
8. Add `$YOUR_KEYPASS_PASSWORD$` and `$YOUR_STOREPASS_PASSWORD$` to the `local.properties` file into `keystore.key.password` and
142-
`keystore.password` fields
143206

144-
9. Run the project using the run or debug buttons. Ta-da! 🚀
207+
> 🚩 If `keytool` fails, your Java setup may be incorrect. Ensure `JAVA_HOME` is set and Java is in the system path.
208+
209+
---
210+
211+
🔑 9. Add Keystore Passwords
212+
213+
In your `local.properties` file, add:
214+
215+
```properties
216+
keystore.key.password=YOUR_KEYPASS_PASSWORD
217+
keystore.password=YOUR_STOREPASS_PASSWORD
218+
```
219+
220+
---
221+
222+
▶️ 10. Run the Project
223+
224+
Click the **Run** or **Debug** button in Anypoint Studio and let the app deploy 🎉

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<password>${anypoint.password}</password>
3636
<applicationName>${app.name}</applicationName>
3737
<environment>${env}</environment>
38-
<workerType>MICRO</workerType>
38+
<workerType>MEDIUM</workerType>
3939
<region>us-east-2</region>
4040
<workers>1</workers>
4141
<objectStoreV2>true</objectStoreV2>

0 commit comments

Comments
 (0)