tools: Build docker image cloudstack-simulator#13597
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CloudStack simulator Docker image build to modernize the base OS/toolchain and address build breakages when building the image in CI.
Changes:
- Upgrade base image to Ubuntu 24.04 and Java to OpenJDK 17.
- Upgrade Node.js installation to Node 24 (NodeSource setup script).
- Make Marvin tarball detection case-insensitive and simplify related build steps.
- Trigger the Docker image workflow on an additional branch.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/docker/Dockerfile | Updates OS/toolchain versions and tweaks Marvin + Node install steps for the simulator image build. |
| .github/workflows/docker-cloudstack-simulator.yml | Adds docker-image-build as an additional push branch trigger for the image build workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13597 +/- ##
============================================
- Coverage 19.50% 19.50% -0.01%
+ Complexity 19440 19438 -2
============================================
Files 6303 6303
Lines 569286 569286
Branches 69791 69791
============================================
- Hits 111037 111027 -10
- Misses 446096 446105 +9
- Partials 12153 12154 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - docker-image-build | ||
| tags: | ||
| - 4.* | ||
| - 5.* |
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.31% |
| Branch coverage | 18.44% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
8a20246 to
8ef4579
Compare
| environment=NODE_OPTIONS="--openssl-legacy-provider" | ||
| command=/bin/bash -c "NODE_OPTIONS=--openssl-legacy-provider npm run serve" |
| push: | ||
| branches: | ||
| - main | ||
| - docker-image-build |
|
@weizhouapache, just out of curiosity, is the UI being built and executed correctly with Node.js 24? |
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.31% |
| Branch coverage | 18.44% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
Yes @bernardodemarco You can have a try with the last image : |
e1edfc7 to
c77429f
Compare
| RUN curl -sL https://deb.nodesource.com/setup_24.x | sudo -E bash -; \ | ||
| apt-get install -y nodejs; \ | ||
| cd ui && npm rebuild node-sass && npm install |
| ipmitool \ | ||
| iproute2 \ | ||
| maven \ | ||
| openjdk-11-jdk \ | ||
| openjdk-17-jre-headless \ | ||
| openjdk-17-jdk \ |
| user=root | ||
|
|
||
| [program:cloudstack-ui] | ||
| environment=NODE_OPTIONS="--openssl-legacy-provider" |
| push: | ||
| branches: | ||
| - main | ||
| - docker-image-build |
There was a problem hiding this comment.
@weizhouapache this branch will be removed before merge?
There was a problem hiding this comment.
yes exactly @sureshanaparti
this is just to build the docker image of this PR
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.31% |
| Branch coverage | 18.44% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
c77429f to
4697a81
Compare
There was a problem hiding this comment.
LGTM Tested manually by pulling the docker image and running the following the commands
root@Docker-Ubuntu24:/home/ubuntu# docker pull apache/cloudstack-simulator:4.23.0.0-SNAPSHOT-20260714-090827
4.23.0.0-SNAPSHOT-20260714-090827: Pulling from apache/cloudstack-simulator
e75bbf472d5a: Pull complete
24bac1a2bf50: Pull complete
98ec780d9189: Pull complete
ef6425f70506: Pull complete
da7a874bd0ac: Pull complete
7afc266f6327: Pull complete
464c26e7ae34: Pull complete
0be468e8b5a8: Pull complete
ca2678b20700: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:99a37a4ef9658f6b2a8e3372dcf5c6f7ce14442fcb1486f0346dd73f275d3606
Status: Downloaded newer image for apache/cloudstack-simulator:4.23.0.0-SNAPSHOT-20260714-090827
docker.io/apache/cloudstack-simulator:4.23.0.0-SNAPSHOT-20260714-090827
root@Docker-Ubuntu24:/home/ubuntu# docker run -d --name cs-sim -p 8080:8080 -p 8096:8096 -p 5050:5050 \
apache/cloudstack-simulator:4.23.0.0-SNAPSHOT-20260714-090827
root@Docker-Ubuntu24:/home/ubuntu# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
33e48774f4e5 apache/cloudstack-simulator:4.23.0.0-SNAPSHOT-20260714-090827 "/usr/bin/supervisord" 4 seconds ago Up 3 seconds 0.0.0.0:5050->5050/tcp, [::]:5050->5050/tcp, 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp, 0.0.0.0:8096->8096/tcp, [::]:8096->8096/tcp cs-sim
root@Docker-Ubuntu24:/home/ubuntu# docker logs -f cs-sim
[INFO] Started Jetty Server
Theme generated successfully
DONE Compiled successfully in 42155ms10:45:58 AM
App running at:
- Local: http://localhost:5050
- Network: http://172.17.0.2:5050
Note that the development build is not optimized.
To create a production build, run npm run build.
---
ubuntu@Docker-Ubuntu24:~$ sudo docker logs cs-sim 2>&1 | grep -i "Server startup\|Started ClientContext\|listening on port"
curl -s http://localhost:8096/client/api?command=listCapabilities\&response=json
{"listcapabilitiesresponse":{"capability":{"securitygroupsenabled":false,"dynamicrolesenabled":true,"cloudstackversion":"4.23.0.0-SNAPSHOT","userpublictemplateenabled":true,"supportELB":"false","projectinviterequired":false,"allowusercreateprojects":true,"customdiskofferingminsize":1,"customdiskofferingmaxsize":1024,"regionsecondaryenabled":false,"kvmsnapshotenabled":true,"snapshotshowchainsize":false,"allowuserviewdestroyedvm":true,"allowuserexpungerecovervm":true,"allowuserexpungerecovervolume":true,"allowuserviewalldomainaccounts":false,"allowuserforcestopvm":true,"kubernetesserviceenabled":true,"kubernetesclusterexperimentalfeaturesenabled":false,"customhypervisordisplayname":"Custom","defaultuipagesize":20,"instancesstatsretentiontime":720,"instancesstatsuseronly":false,"instancesdisksstatsretentionenabled":false,"instancesdisksstatsretentiontime":720,"sharedfsvmmincpucount":2,"sharedfsvmminramsize":1024,"instanceleaseenabled":false,"extensionspath":"/docker exec -it cs-sim2 ls -la /root/setup/dev/"additionalconfigenabled":false}}}
---
root@Docker-Ubuntu24:~$ docker exec -it cs-sim python /root/tools/marvin/marvin/deployDataCenter.py -i /root/setup/dev/advanced.cfg
==== Log Folder Path: /tmp/MarvinLogs/DeployDataCenter__Jul_14_2026_10_55_46_9HE2ZR All logs will be available here ====
==== Deploy DC Started ====
=== Data Center Settings are dumped to /tmp/MarvinLogs/DeployDataCenter__Jul_14_2026_10_55_46_9HE2ZR/dc_entries.obj===
====Deploy DC Successful=====
------
To check the management logs
root@Docker-Ubuntu24:~$ docker exec -it cs-sim bash
root@33e48774f4e5:~# tail -f vmops.log
2026-07-14 11:18:03,579 DEBUG [c.c.a.ApiServlet] (qtp419605775-338:[ctx-741fad32]) (logid:873d6ca2) ===START=== 127.0.0.1 -- POST
lock=false
id=95ab722a-c2d6-4643-bf66-bfebdc5b9fed
response=json
command=disableAccount
sessionkey=0a_QbWKscm3KnXgFXq_C6g1AdMA
2026-07-14 11:18:03,579 DEBUG [c.c.a.ApiServlet] (qtp419605775-338:[ctx-741fad32]) (logid:873d6ca2) Two factor authentication is already verified for the user 2, so skipping
2026-07-14 11:18:03,582 DEBUG [c.c.a.ApiServer] (qtp419605775-338:[ctx-741fad32, ctx-a982930c]) (logid:873d6ca2) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"eaa3b6bf-7f65-11f1-89cd-6ebf5f1ca17c"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
2026-07-14 11:18:03,582 INFO [o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp419605775-338:[ctx-741fad32, ctx-a982930c]) (logid:873d6ca2) Account [Account [{"accountName":"admin","id":2,"uuid":"eaa3b6bf-7f65-11f1-89cd-6ebf5f1ca17c"}]] is Root Admin and there aren't any API key pair permissions involved, thus, all APIs are allowed.
2026-07-14 11:18:03,582 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp419605775-338:[ctx-741fad32, ctx-a982930c]) (logid:873d6ca2) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
2026-07-14 11:18:03,582 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp419605775-338:[ctx-741fad32, ctx-a982930c]) (logid:873d6ca2) API rate limiting is disabled. We will not use ApiRateLimitService.
2026-07-14 11:18:03,585 DEBUG [c.c.u.AccountManagerImpl] (qtp419605775-338:[ctx-741fad32, ctx-a982930c]) (logid:873d6ca2) Account [Account [{"accountName":"admin","id":2,"uuid":"eaa3b6bf-7f65-11f1-89cd-6ebf5f1ca17c"}]] has access to resource.
2026-07-14 11:18:03,632 INFO [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-13:[ctx-b11b8a3b, job-17]) (logid:cacf1fc9) Add job-17 into job monitoring
2026-07-14 11:18:03,633 DEBUG [c.c.a.ApiServer] (AsyncJobMgr-EventBus-1:[ctx-a6983916]) (logid:44c8ea6f) Retrieved cmdEventType from job info: ACCOUNT.DISABLE
2026-07-14 11:18:03,633 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (qtp419605775-338:[ctx-741fad32, ctx-a982930c]) (logid:873d6ca2) submit async job-17, details: AsyncJob {"accountId":2,"cmd":"org.apache.cloudstack.api.command.admin.account.DisableAccountCmd","cmdInfo":"{\"response\":\"json\",\"ctxUserId\":\"2\",\"sessionkey\":\"0a_QbWKscm3KnXgFXq_C6g1AdMA\",\"lock\":\"false\",\"httpmethod\":\"POST\",\"ctxStartEventId\":\"107\",\"id\":\"95ab722a-c2d6-4643-bf66-bfebdc5b9fed\",\"ctxDetails\":\"{\\\"interface com.cloud.user.Account\\\":\\\"95ab722a-c2d6-4643-bf66-bfebdc5b9fed\\\"}\",\"ctxAccountId\":\"2\",\"uuid\":\"95ab722a-c2d6-4643-bf66-bfebdc5b9fed\",\"cmdEventType\":\"ACCOUNT.DISABLE\"}","cmdVersion":0,"completeMsid":null,"created":null,"id":17,"initMsid":191373762771238,"instanceId":4,"instanceType":"Account","lastPolled":null,"lastUpdated":null,"processStatus":0,"removed":null,"result":null,"resultCode":0,"status":"IN_PROGRESS","userId":2,"uuid":"e0bfd269-6ee4-4008-adce-256e2b7ace39"}
2026-07-14 11:18:03,633 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl$5] (API-Job-Executor-13:[ctx-b11b8a3b, job-17]) (logid:e0bfd269) Executing AsyncJob {"accountId":2,"cmd":"org.apache.cloudstack.api.command.admin.account.DisableAccountCmd","cmdInfo":"{\"response\":\"json\",\"ctxUserId\":\"2\",\"sessionkey\":\"0a_QbWKscm3KnXgFXq_C6g1AdMA\",\"lock\":\"false\",\"httpmethod\":\"POST\",\"ctxStartEventId\":\"107\",\"id\":\"95ab722a-c2d6-4643-bf66-bfebdc5b9fed\",\"ctxDetails\":\"{\\\"interface com.cloud.user.Account\\\":\\\"95ab722a-c2d6-4643-bf66-bfebdc5b9fed\\\"}\",\"ctxAccountId\":\"2\",\"uuid\":\"95ab722a-c2d6-4643-bf66-bfebdc5b9fed\",\"cmdEventType\":\"ACCOUNT.DISABLE\"}","cmdVersion":0,"completeMsid":null,"created":null,"id":17,"initMsid":191373762771238,"instanceId":4,"instanceType":"Account","lastPolled":null,"lastUpdated":null,"processStatus":0,"removed":null,"result":null,"resultCode":0,"status":"IN_PROGRESS","userId":2,"uuid":"e0bfd269-6ee4-4008-adce-256e2b7ace39"}
2026-07-14 11:18:03,633 DEBUG [c.c.a.ApiServlet] (qtp419605775-338:[ctx-741fad32, ctx-a982930c]) (logid:873d6ca2) ===END=== 127.0.0.1 -- POST
lock=false
id=95ab722a-c2d6-4643-bf66-bfebdc5b9fed
response=json
command=disableAccount
sessionkey=0a_QbWKscm3KnXgFXq_C6g1AdMA
2026-07-14 11:18:03,636 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-13:[ctx-b11b8a3b, job-17, ctx-2ba6ebd3]) (logid:e0bfd269) Account [Account [{"accountName":"admin","id":2,"uuid":"eaa3b6bf-7f65-11f1-89cd-6ebf5f1ca17c"}]] has access to resource.
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.31% |
| Branch coverage | 18.43% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
|
thanks @kiranchavala @sureshanaparti merging |
| user=root | ||
|
|
||
| [program:cloudstack-ui] | ||
| environment=NODE_OPTIONS="--openssl-legacy-provider" |
| RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -; \ | ||
| RUN curl -sL https://deb.nodesource.com/setup_24.x | sudo -E bash -; \ | ||
| apt-get install -y nodejs; \ | ||
| cd ui && npm rebuild node-sass && npm install |
| MARVIN_FILE=`find /root/tools/marvin/dist/ -name "[mM]arvin*.tar.gz"`; \ | ||
| pip3 install $MARVIN_FILE --break-system-packages |
| pip3 install $MARVIN_FILE --break-system-packages | ||
|
|
||
| RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -; \ | ||
| RUN curl -sL https://deb.nodesource.com/setup_24.x | sudo -E bash -; \ |
|
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.31% |
| Branch coverage | 18.44% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run



Description
This PR fixes docker image build errors
ubuntu 24.04instead of ubunutu 22.04Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?