|
46 | 46 | <pre><code>docker images |
47 | 47 | </code></pre> |
48 | 48 | <aside class="special"><p> Tip: you can rename the image and tag as follows</p> |
49 | | -<pre><code>docker tag <original_name>:<original_tag> solace-agent-mesh-enterprise:1.0.37 |
| 49 | +<pre><code>docker tag <original_name>:<original_tag> solace-agent-mesh-enterprise:<version> |
50 | 50 | </code></pre> |
51 | 51 | </aside> |
52 | 52 | <aside class="special"><p> If you don't have <code>docker</code> you can use <code>podman</code> and replace every docker command with podman</p> |
|
80 | 80 | </li> |
81 | 81 | <li>Install solace agent mesh<pre><code>pip install solace-agent-mesh |
82 | 82 | </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> |
84 | 86 | </aside> |
85 | 87 | </li> |
86 | 88 | </ol> |
|
127 | 129 | <p>Now back to your terminal window, lets investigate the directories. Open your directory in your favourite editor</p> |
128 | 130 | <p class="image-container"><img alt="vscode" src="img/6dd2627073232e51.png"></p> |
129 | 131 | <ol type="1"> |
130 | | -<li>configs: contains yaml config files <ul> |
| 132 | +<li><code>configs</code>: contains yaml config files <ul> |
131 | 133 | <li>agents –> e.g. <code>main_orchestrator.yaml</code></li> |
132 | 134 | <li>gateways –> e.g. <code>webui.yaml</code></li> |
133 | 135 | </ul> |
134 | 136 | </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> |
138 | 140 | </ol> |
139 | 141 |
|
140 | 142 |
|
141 | 143 | </google-codelab-step> |
142 | 144 |
|
143 | | - <google-codelab-step label="Init SAM Enterprise" duration="10"> |
| 145 | + <google-codelab-step label="Start SAM Enterprise" duration="10"> |
144 | 146 | <p>This step is involved with running SAM enterprise with the new files generated.</p> |
145 | 147 | <ol type="1"> |
146 | 148 | <li>Create a <code>docker-compose.yaml</code> file with the following content<pre><code language="language-yaml" class="language-yaml">services: |
147 | 149 | sam-ent: |
148 | | - image: imageName:tag |
| 150 | + image: solace-agent-mesh-enterprise:1.0.37 |
149 | 151 | container_name: sam-ent |
150 | 152 | platform: linux/amd64 |
151 | 153 | # entrypoint: /bin/bash |
|
154 | 156 | volumes: |
155 | 157 | - ./configs:/app/configs |
156 | 158 | - ./.env:/app/.env |
| 159 | + - ./enterprise-logs:/app # Map the entire /app directory to enterprise-logs |
| 160 | + |
157 | 161 | networks: |
158 | 162 | - sam-network |
159 | 163 | ports: |
160 | 164 | - "0.0.0.0:8001:8001" # expose container port 8001 as port 8001 on host IP 0.0.0.0 |
161 | 165 |
|
162 | | - networks: |
| 166 | +networks: |
163 | 167 | sam-network: |
164 | 168 | external: true # reuse your existing network |
| 169 | + |
165 | 170 | </code></pre> |
166 | 171 | 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> |
168 | 173 | <li><code>platform: linux/amd64</code> if you are running on mac</li> |
169 | 174 | <li><code>networks: sam-network</code> if you are attempting to connect to a local solace broker running on docker</li> |
170 | 175 | <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> |
171 | 177 | </ul> |
172 | 178 | <aside class="special"><p> There are two modes of operation for SAM</p> |
173 | 179 | <ol type="1"> |
|
176 | 182 | </ol> |
177 | 183 | </aside> |
178 | 184 | </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 |
180 | 189 | </code></pre> |
181 | 190 | </li> |
182 | 191 | <li>Add the solace broker container to the same SAM network<pre><code>docker network connect sam-network solace |
|
187 | 196 | <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> |
188 | 197 | <li><code>FASTAPI_PORT="8001"</code>- In case your solace broker has port 8000 exposed</li> |
189 | 198 | </ul> |
| 199 | +This is the final <code>.env</code> file<pre><code>LLM_SERVICE_ENDPOINT="https://lite-llm.mymaas.net" |
| 200 | +LLM_SERVICE_API_KEY="<llm_token_goes_here>" |
| 201 | +LLM_SERVICE_PLANNING_MODEL_NAME="openai/azure-gpt-4o" |
| 202 | +LLM_SERVICE_GENERAL_MODEL_NAME="openai/azure-gpt-4o" |
| 203 | +NAMESPACE="bootcamp/" |
| 204 | +SOLACE_BROKER_URL="ws://solace:8008" |
| 205 | +SOLACE_BROKER_VPN="default" |
| 206 | +SOLACE_BROKER_USERNAME="default" |
| 207 | +SOLACE_BROKER_PASSWORD="default" |
| 208 | +SOLACE_DEV_MODE="false" |
| 209 | +SESSION_SECRET_KEY="temp" |
| 210 | +FASTAPI_HOST="0.0.0.0" |
| 211 | +FASTAPI_PORT="8001" |
| 212 | +FASTAPI_HTTPS_PORT="8443" |
| 213 | +SSL_KEYFILE="" |
| 214 | +SSL_CERTFILE="" |
| 215 | +SSL_KEYFILE_PASSWORD="" |
| 216 | +ENABLE_EMBED_RESOLUTION="True" |
| 217 | +LOGGING_CONFIG_PATH="configs/logging_config.ini" |
| 218 | +S3_BUCKET_NAME="" |
| 219 | +S3_ENDPOINT_URL="" |
| 220 | +S3_REGION="us-east-1" |
| 221 | +WEB_UI_GATEWAY_DATABASE_URL="sqlite:////Users/tamimi/sam-bootcamp/data/webui_gateway.db" |
| 222 | +</code></pre> |
190 | 223 | </li> |
191 | 224 | <li>Run docker compose<pre><code>docker compose up |
192 | 225 | </code></pre> |
|
0 commit comments