|
17 | 17 | # You should have received a copy of the GNU Affero General Public License |
18 | 18 | # along with this program. If not, see <https://www.gnu.org/licenses/>. |
19 | 19 |
|
20 | | -import os |
21 | 20 | import io |
22 | | -import time |
23 | 21 | import itertools |
24 | 22 | import logging |
| 23 | +import os |
| 24 | +import time |
25 | 25 | from typing import Optional |
26 | 26 |
|
27 | 27 | import docker |
28 | 28 | from docker.client import DockerClient |
29 | | -from docker.models.containers import Container |
30 | 29 | from docker.errors import NotFound |
| 30 | +from docker.models.containers import Container |
31 | 31 |
|
32 | | -from node_cli.utils.helper import run_cmd, str_to_bool |
33 | 32 | from node_cli.configs import ( |
34 | 33 | COMPOSE_PATH, |
35 | | - SYNC_COMPOSE_PATH, |
36 | 34 | MIRAGE_COMPOSE_PATH, |
| 35 | + NGINX_CONTAINER_NAME, |
37 | 36 | REMOVED_CONTAINERS_FOLDER_PATH, |
38 | 37 | SGX_CERTIFICATES_DIR_NAME, |
39 | | - NGINX_CONTAINER_NAME, |
| 38 | + SYNC_COMPOSE_PATH, |
40 | 39 | ) |
| 40 | +from node_cli.utils.helper import run_cmd, str_to_bool |
41 | 41 | from node_cli.utils.node_type import NodeType |
42 | 42 |
|
43 | | - |
44 | 43 | logger = logging.getLogger(__name__) |
45 | 44 |
|
46 | 45 | SCHAIN_REMOVE_TIMEOUT = 300 |
|
76 | 75 | BASE_MIRAGE_BOOT_COMPOSE_SERVICES = { |
77 | 76 | **CORE_MIRAGE_COMPOSE_SERVICES, |
78 | 77 | 'mirage-boot': 'mirage_boot_admin', |
| 78 | + 'mirage-boot-api': 'mirage_boot_api', |
79 | 79 | } |
80 | 80 |
|
81 | 81 | BASE_SYNC_COMPOSE_SERVICES = { |
@@ -326,17 +326,17 @@ def compose_up( |
326 | 326 |
|
327 | 327 | if node_type == NodeType.MIRAGE: |
328 | 328 | logger.info('Running mirage base set of containers') |
329 | | - if not is_mirage_boot: |
330 | | - logger.debug('Launching mirage containers with env %s', env) |
331 | | - run_cmd(cmd=get_up_compose_cmd(node_type=NodeType.MIRAGE, services=services), env=env) |
332 | | - else: |
| 329 | + if is_mirage_boot: |
333 | 330 | logger.debug('Launching mirage boot containers with env %s', env) |
334 | 331 | run_cmd( |
335 | 332 | cmd=get_up_compose_cmd( |
336 | 333 | node_type=NodeType.MIRAGE, services=list(BASE_MIRAGE_BOOT_COMPOSE_SERVICES) |
337 | 334 | ), |
338 | 335 | env=env, |
339 | 336 | ) |
| 337 | + else: |
| 338 | + logger.debug('Launching mirage containers with env %s', env) |
| 339 | + run_cmd(cmd=get_up_compose_cmd(node_type=NodeType.MIRAGE, services=services), env=env) |
340 | 340 | else: |
341 | 341 | logger.info('Running skale node base set of containers') |
342 | 342 | logger.debug('Launching skale node containers with env %s', env) |
|
0 commit comments