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
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,35 @@ Access the web console with the default credentials:
- Username: `mcmp`
- Password: `mcmp_password`

## Step 6-1. Accept the Nexus Community Edition EULA (required for Application Manager)

`mc-application-manager` stores imported packages in Nexus (`mc-application-manager-sonatype-nexus`).
Since Nexus Repository 3.77, the free edition (Community Edition) keeps the Docker registry and other features locked
until an administrator accepts the End User License Agreement. A fresh install starts with `accepted: false`, and
image pushes to the Docker registry fail with `403 You must accept the End User License Agreement`
(e.g. SW Catalogs > Register > Public Registry > Import & Create).

Review the EULA (https://links.sonatype.com/products/nxrm/ce-eula), then accept it once after the platform is up:
```shell
cd mc-admin-cli/conf/docker
NEXUS_PW=$(grep -E '^MC_APPLICATION_MANAGER_NEXUS_INITIAL_PASSWORD=' .env | cut -d= -f2-)
NEXUS_PORT=$(grep -E '^MC_APPLICATION_MANAGER_NEXUS_PORT=' .env | cut -d= -f2-)
EULA_URL="http://localhost:${NEXUS_PORT}/service/rest/v1/system/eula"

# Check the current state (accepted: false on a fresh install)
curl -s -u "admin:${NEXUS_PW}" "$EULA_URL"

# Accept — the request must echo back the disclaimer text returned above
curl -s -u "admin:${NEXUS_PW}" "$EULA_URL" \
| python3 -c 'import json,sys; d=json.load(sys.stdin); d["accepted"]=True; print(json.dumps(d))' \
| curl -s -o /dev/null -w '%{http_code}\n' -u "admin:${NEXUS_PW}" -X POST \
-H 'Content-Type: application/json' -d @- "$EULA_URL"
# Expected: 204, and a re-check shows "accepted" : true
```
You can also accept it in the Nexus UI (`http://<host>:${MC_APPLICATION_MANAGER_NEXUS_PORT}`, sign in as `admin`).
The acceptance is stored in the Nexus data volume, so it is required again after `cleanAll.sh` or any reset of
`conf/docker/container-volume/mc-application-manager/nexus`.

## Step 7. Clean Up

If you want to completely reset the environment (removes all Docker containers, images, and volumes):
Expand Down
4 changes: 2 additions & 2 deletions conf/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
password:

mc-iam-manager:
version: 0.7.0
version: 0.7.1
baseurl: http://mc-iam-manager:5000
auth:
type: bearer
Expand All @@ -25,7 +25,7 @@ services:
password: spider

mc-web-console:
version: 0.7.0
version: 0.7.1
baseurl: http://mc-web-console:3000
auth:
type: bearer
Expand Down
4 changes: 2 additions & 2 deletions conf/docker/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
password:

mc-iam-manager:
version: 0.7.0
version: 0.7.1
baseurl: http://mc-iam-manager:5000
auth:
type: bearer
Expand All @@ -25,7 +25,7 @@ services:
password: spider

mc-web-console:
version: 0.7.0
version: 0.7.1
baseurl: http://mc-web-console:3000
auth:
type: bearer
Expand Down
4 changes: 2 additions & 2 deletions conf/docker/conf/mc-web-console/api/conf/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
password:

mc-iam-manager:
version: 0.7.0
version: 0.7.1
baseurl: http://mc-iam-manager:5000
auth:
type: bearer
Expand All @@ -25,7 +25,7 @@ services:
password: default

mc-web-console:
version: 0.7.0
version: 0.7.1
baseurl: http://mc-web-console-api:3000
auth:
type: bearer
Expand Down
6 changes: 3 additions & 3 deletions conf/docker/docker-compose.mini.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ services:

mc-iam-manager:
container_name: mc-iam-manager
image: cloudbaristaorg/mc-iam-manager:0.7.0
image: cloudbaristaorg/mc-iam-manager:0.7.1
restart: unless-stopped
networks:
- mc-iam-manager-network
Expand Down Expand Up @@ -389,7 +389,7 @@ services:
exec docker-entrypoint.sh postgres"

mc-web-console-api:
image: cloudbaristaorg/mc-web-console-api:0.7.0
image: cloudbaristaorg/mc-web-console-api:0.7.1
pull_policy: always
container_name: mc-web-console-api
platform: linux/amd64
Expand Down Expand Up @@ -438,7 +438,7 @@ services:
<<: *default-health-check

mc-web-console-front:
image: cloudbaristaorg/mc-web-console-front:0.7.0
image: cloudbaristaorg/mc-web-console-front:0.7.1
pull_policy: always
container_name: mc-web-console-front
platform: linux/amd64
Expand Down
6 changes: 3 additions & 3 deletions conf/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ services:

mc-iam-manager:
container_name: mc-iam-manager
image: cloudbaristaorg/mc-iam-manager:0.7.0
image: cloudbaristaorg/mc-iam-manager:0.7.1
restart: unless-stopped
networks:
- mc-iam-manager-network
Expand Down Expand Up @@ -1187,7 +1187,7 @@ services:
exec docker-entrypoint.sh postgres"

mc-web-console-api:
image: cloudbaristaorg/mc-web-console-api:0.7.0
image: cloudbaristaorg/mc-web-console-api:0.7.1
pull_policy: always
container_name: mc-web-console-api
platform: linux/amd64
Expand Down Expand Up @@ -1231,7 +1231,7 @@ services:
<<: *default-health-check

mc-web-console-front:
image: cloudbaristaorg/mc-web-console-front:0.7.0
image: cloudbaristaorg/mc-web-console-front:0.7.1
pull_policy: always
container_name: mc-web-console-front
platform: linux/amd64
Expand Down
8 changes: 5 additions & 3 deletions src/cmd/rest/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ var password string
var isShowHeaders bool
var sendData string
var inputFileData string
var fileData string

var isVerbose bool
var authToken string
Expand All @@ -48,7 +47,10 @@ var restCmd = &cobra.Command{
SetAuthToken() // Authorization: <auth-scheme> <auth-token-value> // default auth-scheme : Bearer
SetBasicAuth() // Authorization: Basic <base64-encoded-value>
SetHeaders()
SetReqData()
if err := SetReqData(); err != nil {
fmt.Println(err)
os.Exit(1)
}

if isVerbose {
fmt.Println("==============================")
Expand Down Expand Up @@ -221,7 +223,7 @@ func init() {

// Add flag for post data
restCmd.PersistentFlags().StringVarP(&sendData, "data", "d", "", "Data to send to the server")
restCmd.PersistentFlags().StringVarP(&fileData, "file", "f", "", "Data to send to the server from file")
restCmd.PersistentFlags().StringVarP(&inputFileData, "file", "f", "", "Data to send to the server from file")

restCmd.PersistentFlags().BoolVarP(&isVerbose, "verbose", "v", false, "Show more detail information")

Expand Down
Loading