Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bin/mcc
Binary file not shown.
18 changes: 9 additions & 9 deletions conf/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,47 +31,47 @@ services:
type: bearer

mc-observability:
version: 0.5.0
version: 0.7.0
baseurl: http://mc-observability-manager:18080
auth:

mc-application-manager:
version: 0.5.2
version: 0.7.2
baseurl: http://mc-application-manager:18084
auth:

mc-workflow-manager:
version: 0.5.1
version: 0.7.2
baseurl: http://mc-workflow-manager:18083
auth:

mc-cost-optimizer:
version: 0.5.2
version: 0.7.0
baseurl: http://mc-cost-optimizer-be:9090
auth:

mc-data-manager:
version: 0.5.3
version: 0.7.3
baseurl: http://mc-data-manager:3300
auth:

mc-cost-optimizer-fe:
version: 0.5.2
version: 0.7.0
baseurl: http://mc-cost-optimizer-fe:7780
auth:

mc-workflow-manager-fe:
version: 0.5.1
version: 0.7.2
baseurl: http://mc-workflow-manager:18083
auth:

mc-data-manager-fe:
version: 0.5.3
version: 0.7.3
baseurl: http://mc-data-manager:3300
auth:

mc-application-manager-fe:
version: 0.5.2
version: 0.7.2
baseurl: http://mc-application-manager:18084
auth:

Expand Down
18 changes: 9 additions & 9 deletions conf/docker/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,47 +31,47 @@ services:
type: bearer

mc-observability:
version: 0.5.0
version: 0.7.0
baseurl: http://mc-observability-manager:18080
auth:

mc-application-manager:
version: 0.5.2
version: 0.7.2
baseurl: http://mc-application-manager:18084
auth:

mc-workflow-manager:
version: 0.5.1
version: 0.7.2
baseurl: http://mc-workflow-manager:18083
auth:

mc-cost-optimizer:
version: 0.5.2
version: 0.7.0
baseurl: http://mc-cost-optimizer-be:9090
auth:

mc-data-manager:
version: 0.5.3
version: 0.7.3
baseurl: http://mc-data-manager:3300
auth:

mc-cost-optimizer-fe:
version: 0.5.2
version: 0.7.0
baseurl: http://mc-cost-optimizer-fe:7780
auth:

mc-workflow-manager-fe:
version: 0.5.1
version: 0.7.2
baseurl: http://mc-workflow-manager:18083
auth:

mc-data-manager-fe:
version: 0.5.3
version: 0.7.3
baseurl: http://mc-data-manager:3300
auth:

mc-application-manager-fe:
version: 0.5.2
version: 0.7.2
baseurl: http://mc-application-manager:18084
auth:

Expand Down
20 changes: 10 additions & 10 deletions conf/docker/conf/mc-web-console/api/conf/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,52 +31,52 @@ services:
type: bearer

mc-observability:
version: 0.4.0
version: 0.7.0
baseurl: http://mc-observability-manager:18080
auth:

mc-application-manager:
version: 0.4.0
version: 0.7.2
baseurl: http://mc-application-manager:18084
auth:

mc-workflow-manager:
version: 0.4.0
version: 0.7.2
baseurl: http://mc-workflow-manager:18083
auth:

mc-cost-optimizer:
version: 0.4.0
version: 0.7.0
baseurl: http://mc-cost-optimizer-be:9090
auth:

mc-cost-optimizer-fe:
version: 0.4.0
version: 0.7.0
baseurl: http://mc-cost-optimizer-fe:7780
auth:

mc-data-manager:
version: 0.4.0
version: 0.7.3
baseurl: http://mc-data-manager:3300
auth:

mc-workflow-manager-fe:
version: v0.0.1
version: 0.7.2
baseurl: http://mc-workflow-manager:18083
auth:

mc-data-manager-fe:
version: v0.0.1
version: 0.7.3
baseurl: http://mc-data-manager:3300
auth:

mc-application-manager-fe:
version: v0.0.1
version: 0.7.2
baseurl: http://mc-application-manager:18084
auth:

mc-observability-fe:
version: v0.0.1
version: 0.7.0
baseurl: http://mc-observability-front:18081
auth:

Expand Down
Binary file modified conf/docker/tool/mcc
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/mc-admin-cli-infra.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ go build -o ../bin/mcc main.go
../bin/mcc infra update -s "서브시스템명"
```

update는 이미지를 받은 뒤 컨테이너를 detach 모드로 재기동하고 종료합니다. 서비스 상태는 `../bin/mcc infra info` 또는 `docker logs <컨테이너명>`으로 확인합니다.


## M-CMP 중지
```bash
Expand Down
32 changes: 19 additions & 13 deletions src/cmd/docker/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,44 @@ import (
"github.com/spf13/cobra"
)

// pullCmd represents the pull command
// updateCmd represents the update command
var updateCmd = &cobra.Command{
Use: "update",
Short: "Update the latest Docker images of the subsystems that make up the M-CMP System.",
Long: `Update the latest Docker images of the subsystems that make up the M-CMP System.`,
Run: func(cmd *cobra.Command, args []string) {
Long: `Update the latest Docker images of the subsystems that make up the M-CMP System.
The images are pulled and the containers are restarted in detached mode, so the command
returns when the update is done. Use './mcc infra info' or 'docker logs' to check the services.`,
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("\n[Update the Docker images of the subsystems that make up the M-CMP System.]")
if DockerFilePath == "" {
return fmt.Errorf("--file (-f) argument is required but not provided")
}

//============================
// Pull
//============================
fmt.Println("[Install the latest Docker images of the M-CMP subsystems.]")
fmt.Println()

cmdStr := fmt.Sprintf("COMPOSE_PROJECT_NAME=%s docker compose -f %s pull %s", ComposeProjectName, DockerFilePath, ServiceName)
//fmt.Println(cmdStr)
common.SysCall(cmdStr)
if err := common.SysCallWithError(cmdStr); err != nil {
return fmt.Errorf("failed to pull the Docker images: %w", err)
}

//============================
// RUN
//============================
fmt.Println("\n\n[Restart based on the installed latest Docker images.]")
fmt.Println()

detachModeOption := ""
if detachFlag {
detachModeOption = "-d"
// Always detached: update must return once the containers are restarted.
// An attached 'up' never exits, and stopping it with Ctrl+C stops the containers.
cmdStr = fmt.Sprintf("COMPOSE_PROJECT_NAME=%s docker compose -f %s up -d %s", ComposeProjectName, DockerFilePath, ServiceName)
if err := common.SysCallWithError(cmdStr); err != nil {
return fmt.Errorf("failed to restart the containers: %w", err)
}
cmdStr = fmt.Sprintf("COMPOSE_PROJECT_NAME=%s docker compose -f %s up %s %s", ComposeProjectName, DockerFilePath, detachModeOption, ServiceName)

//fmt.Println(cmdStr)
common.SysCall(cmdStr)

return nil
},
}

Expand Down
Loading