Skip to content

Commit 20b8f74

Browse files
committed
Merge branch 'master' of github.com:SolaceDev/solace-dev-codelabs
2 parents c869c2e + 53ce001 commit 20b8f74

File tree

2 files changed

+45
-12
lines changed

2 files changed

+45
-12
lines changed

codelabs/ai-bootcamp/codelab.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"format": "html",
44
"prefix": "https://storage.googleapis.com",
55
"mainga": "UA-49880327-14",
6-
"updated": "2025-09-20T13:36:39Z",
6+
"updated": "2025-09-20T14:03:00Z",
77
"id": "ai-bootcamp",
88
"duration": 44,
99
"title": "AI Bootcamp - Solace HQ",

codelabs/ai-bootcamp/index.html

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<pre><code>docker images
4747
</code></pre>
4848
<aside class="special"><p> Tip: you can rename the image and tag as follows</p>
49-
<pre><code>docker tag &lt;original_name&gt;:&lt;original_tag&gt; solace-agent-mesh-enterprise:1.0.37
49+
<pre><code>docker tag &lt;original_name&gt;:&lt;original_tag&gt; solace-agent-mesh-enterprise:&lt;version&gt;
5050
</code></pre>
5151
</aside>
5252
<aside class="special"><p> If you don&#39;t have <code>docker</code> you can use <code>podman</code> and replace every docker command with podman</p>
@@ -80,7 +80,9 @@
8080
</li>
8181
<li>Install solace agent mesh<pre><code>pip install solace-agent-mesh
8282
</code></pre>
83-
<aside class="special"><p> Since you activated the virtual environment, you can use <code>pip</code> instead of <code>pip3</code> and <code>python</code> instead of <code>python3</code> since everything is within the virtual env session. You can confirm this by running <code>python --version</code></p>
83+
<aside class="special"><p> Since you activated the virtual environment, you can use <code>pip</code> instead of <code>pip3</code> and <code>python</code> instead of <code>python3</code> since everything is within the virtual env session. You can confirm this by running</p>
84+
<pre><code>python --version
85+
</code></pre>
8486
</aside>
8587
</li>
8688
</ol>
@@ -127,25 +129,25 @@
127129
<p>Now back to your terminal window, lets investigate the directories. Open your directory in your favourite editor</p>
128130
<p class="image-container"><img alt="vscode" src="img/6dd2627073232e51.png"></p>
129131
<ol type="1">
130-
<li>configs: contains yaml config files <ul>
132+
<li><code>configs</code>: contains yaml config files <ul>
131133
<li>agents –&gt; e.g. <code>main_orchestrator.yaml</code></li>
132134
<li>gateways –&gt; e.g. <code>webui.yaml</code></li>
133135
</ul>
134136
</li>
135-
<li>venv: contains all python packages</li>
136-
<li>.env: environment variables</li>
137-
<li>.sam: plugins templates</li>
137+
<li><code>venv</code>: contains all python packages</li>
138+
<li><code>.env</code>: environment variables</li>
139+
<li><code>.sam</code>: plugins templates</li>
138140
</ol>
139141

140142

141143
</google-codelab-step>
142144

143-
<google-codelab-step label="Init SAM Enterprise" duration="10">
145+
<google-codelab-step label="Start SAM Enterprise" duration="10">
144146
<p>This step is involved with running SAM enterprise with the new files generated.</p>
145147
<ol type="1">
146148
<li>Create a <code>docker-compose.yaml</code> file with the following content<pre><code language="language-yaml" class="language-yaml">services:
147149
sam-ent:
148-
image: imageName:tag
150+
image: solace-agent-mesh-enterprise:1.0.37
149151
container_name: sam-ent
150152
platform: linux/amd64
151153
# entrypoint: /bin/bash
@@ -154,20 +156,24 @@
154156
volumes:
155157
- ./configs:/app/configs
156158
- ./.env:/app/.env
159+
- ./enterprise-logs:/app # Map the entire /app directory to enterprise-logs
160+
157161
networks:
158162
- sam-network
159163
ports:
160164
- &#34;0.0.0.0:8001:8001&#34; # expose container port 8001 as port 8001 on host IP 0.0.0.0
161165

162-
networks:
166+
networks:
163167
sam-network:
164168
external: true # reuse your existing network
169+
165170
</code></pre>
166171
Notes:<ul>
167-
<li>Update the image name:tag to what you your image is called. Execute <code>docker images</code> to get a list</li>
172+
<li>Update the image <code>name:tag</code> to what you your image is called. Execute <code>docker images</code> to get a list.</li>
168173
<li><code>platform: linux/amd64</code> if you are running on mac</li>
169174
<li><code>networks: sam-network</code> if you are attempting to connect to a local solace broker running on docker</li>
170175
<li>We are passing the <code>configs</code> directory and <code>.env</code> file as volumes to the container</li>
176+
<li>We are placing all the sam logs created in the container to a local directory called <code>enterprise-logs</code></li>
171177
</ul>
172178
<aside class="special"><p> There are two modes of operation for SAM</p>
173179
<ol type="1">
@@ -176,7 +182,10 @@
176182
</ol>
177183
</aside>
178184
</li>
179-
<li>[Optional] Run local solace broker (alternatively: use Solace Cloud)<pre><code>docker run -d -p 8080:8080 -p 55554:55555 -p 8008:8008 -p 1883:1883 -p 5672:5672 -p 9000:9000 -p 2222:2222 --shm-size=2g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace solace/solace-pubsub-standard
185+
<li>Create a directory called <code>enterprise-logs</code><pre><code>mkdir enterprise-logs
186+
</code></pre>
187+
</li>
188+
<li>[Optional] Run local solace broker (alternatively: use Solace Cloud)<pre><code>docker run -d -p 8080:8080 -p 55554:55555 -p 8008:8008 -p 8000:8000 -p 1883:1883 -p 5672:5672 -p 9000:9000 -p 2222:2222 --shm-size=2g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace solace/solace-pubsub-standard
180189
</code></pre>
181190
</li>
182191
<li>Add the solace broker container to the same SAM network<pre><code>docker network connect sam-network solace
@@ -187,6 +196,30 @@
187196
<li><code>FASTAPI_HOST="0.0.0.0"</code> - This where the webUI Gateway is hosted on the SAM Enterprise container. We change it to <code>0.0.0.0</code> to make sure its accessed by host IP</li>
188197
<li><code>FASTAPI_PORT="8001"</code>- In case your solace broker has port 8000 exposed</li>
189198
</ul>
199+
This is the final <code>.env</code> file<pre><code>LLM_SERVICE_ENDPOINT=&#34;https://lite-llm.mymaas.net&#34;
200+
LLM_SERVICE_API_KEY=&#34;&lt;llm_token_goes_here&gt;&#34;
201+
LLM_SERVICE_PLANNING_MODEL_NAME=&#34;openai/azure-gpt-4o&#34;
202+
LLM_SERVICE_GENERAL_MODEL_NAME=&#34;openai/azure-gpt-4o&#34;
203+
NAMESPACE=&#34;bootcamp/&#34;
204+
SOLACE_BROKER_URL=&#34;ws://solace:8008&#34;
205+
SOLACE_BROKER_VPN=&#34;default&#34;
206+
SOLACE_BROKER_USERNAME=&#34;default&#34;
207+
SOLACE_BROKER_PASSWORD=&#34;default&#34;
208+
SOLACE_DEV_MODE=&#34;false&#34;
209+
SESSION_SECRET_KEY=&#34;temp&#34;
210+
FASTAPI_HOST=&#34;0.0.0.0&#34;
211+
FASTAPI_PORT=&#34;8001&#34;
212+
FASTAPI_HTTPS_PORT=&#34;8443&#34;
213+
SSL_KEYFILE=&#34;&#34;
214+
SSL_CERTFILE=&#34;&#34;
215+
SSL_KEYFILE_PASSWORD=&#34;&#34;
216+
ENABLE_EMBED_RESOLUTION=&#34;True&#34;
217+
LOGGING_CONFIG_PATH=&#34;configs/logging_config.ini&#34;
218+
S3_BUCKET_NAME=&#34;&#34;
219+
S3_ENDPOINT_URL=&#34;&#34;
220+
S3_REGION=&#34;us-east-1&#34;
221+
WEB_UI_GATEWAY_DATABASE_URL=&#34;sqlite:////Users/tamimi/sam-bootcamp/data/webui_gateway.db&#34;
222+
</code></pre>
190223
</li>
191224
<li>Run docker compose<pre><code>docker compose up
192225
</code></pre>

0 commit comments

Comments
 (0)