Skip to content

Commit 769c8ca

Browse files
authored
Rename MCS to Console in codebase (#205)
1 parent bc8429b commit 769c8ca

File tree

229 files changed

+891
-866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+891
-866
lines changed

.dockerignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
node_modules/
22
dist/
33
target/
4-
mcs
5-
!mcs/
4+
console
5+
!console/
66
portal-ui/node_modules/

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
run: |
3434
make verifiers
3535
make test
36-
make mcs
36+
make console

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ vendor/
1919

2020
# Ignore executables
2121
target/
22-
mcs
23-
!mcs/
22+
console
23+
!console/
2424

2525
dist/
2626

@@ -31,4 +31,4 @@ public.crt
3131
# Ignore VsCode files
3232
.vscode/
3333
*.code-workspace
34-
*~
34+
*~

.goreleaser.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is an example goreleaser.yaml file with some sane defaults.
22
# Make sure to check the documentation at http://goreleaser.com
3-
project_name: mcs
3+
project_name: console
44

55
before:
66
hooks:
@@ -18,12 +18,12 @@ builds:
1818
- arm64
1919
env:
2020
- CGO_ENABLED=0
21-
main: ./cmd/mcs/
21+
main: ./cmd/console/
2222
flags:
2323
- -trimpath
2424
- --tags=kqueue
2525
ldflags:
26-
- -s -w -X github.com/minio/mcs/pkg.ReleaseTag={{.Tag}} -X github.com/minio/mcs/pkg.CommitID={{.FullCommit}} -X github.com/minio/mcs/pkg.Version={{.Version}} -X github.com/minio/mcs/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/mcs/pkg.ReleaseTime={{.Date}}
26+
- -s -w -X github.com/minio/console/pkg.ReleaseTag={{.Tag}} -X github.com/minio/console/pkg.CommitID={{.FullCommit}} -X github.com/minio/console/pkg.Version={{.Version}} -X github.com/minio/console/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/console/pkg.ReleaseTime={{.Date}}
2727
archives:
2828
-
2929
replacements:
@@ -51,7 +51,7 @@ changelog:
5151
nfpms:
5252
-
5353
vendor: MinIO Inc.
54-
homepage: https://github.com/minio/mcs
54+
homepage: https://github.com/minio/console
5555
maintainer: MinIO <[email protected]>
5656
description: MinIO Console Server
5757
license: GNU Affero General Public License v3.0
@@ -71,5 +71,5 @@ dockers:
7171
goarch: amd64
7272
dockerfile: Dockerfile.release
7373
image_templates:
74-
- "minio/mcs:{{ .Tag }}"
75-
- "minio/mcs:latest"
74+
- "minio/console:{{ .Tag }}"
75+
- "minio/console:latest"

CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ make swagger-gen
2020

2121
This will update all the necessary code.
2222

23-
`./restapi/configure_mcs.go` is a file that contains the handlers to be used by the application, here is the only place where we need to update our code to support the new apis. This file is not affected when running the swagger generator and it is safe to edit.
23+
`./restapi/configure_console.go` is a file that contains the handlers to be used by the application, here is the only place where we need to update our code to support the new apis. This file is not affected when running the swagger generator and it is safe to edit.
2424

2525
## Unit Tests
2626
`./restapi/handlers_test.go` needs to be updated with the proper tests for the new api.
@@ -47,13 +47,13 @@ $ git push origin my-new-feature
4747
Pull requests can be created via GitHub. Refer to [this document](https://help.github.com/articles/creating-a-pull-request/) for detailed steps on how to create a pull request. After a Pull Request gets peer reviewed and approved, it will be merged.
4848

4949
## FAQs
50-
### How does ``mcs`` manages dependencies?
50+
### How does ``console`` manages dependencies?
5151
``MinIO`` uses `go mod` to manage its dependencies.
5252
- Run `go get foo/bar` in the source folder to add the dependency to `go.mod` file.
5353

5454
To remove a dependency
5555
- Edit your code and remove the import reference.
5656
- Run `go mod tidy` in the source folder to remove dependency from `go.mod` file.
5757

58-
### What are the coding guidelines for mcs?
59-
``mcs`` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.min.io).
58+
### What are the coding guidelines for console?
59+
``console`` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.min.io).

DEVELOPMENT.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# LDAP authentication with MCS
1+
# LDAP authentication with Console
22

33
## Setup
44

@@ -32,13 +32,13 @@ dn: ou=groups,dc=example,dc=org
3232
objectclass:organizationalunit
3333
ou: groups
3434
description: generic groups branch
35-
# create mcsAdmin group (this already exists on minio and have a policy of s3::*)
36-
dn: cn=mcsAdmin,ou=groups,dc=example,dc=org
35+
# create consoleAdmin group (this already exists on minio and have a policy of s3::*)
36+
dn: cn=consoleAdmin,ou=groups,dc=example,dc=org
3737
objectClass: top
3838
objectClass: posixGroup
3939
gidNumber: 678
4040
# Assing group to new user
41-
dn: cn=mcsAdmin,ou=groups,dc=example,dc=org
41+
dn: cn=consoleAdmin,ou=groups,dc=example,dc=org
4242
changetype: modify
4343
add: memberuid
4444
memberuid: billy
@@ -48,7 +48,7 @@ $ docker cp billy.ldif my-openldap-container:/container/service/slapd/assets/tes
4848
$ docker exec my-openldap-container ldapadd -x -D "cn=admin,dc=example,dc=org" -w admin -f /container/service/slapd/assets/test/billy.ldif -H ldap://localhost -ZZ
4949
```
5050

51-
Query the ldap server to check the user billy was created correctly and got assigned to the mcsAdmin group, you should get a list
51+
Query the ldap server to check the user billy was created correctly and got assigned to the consoleAdmin group, you should get a list
5252
containing ldap users and groups.
5353

5454
```
@@ -73,9 +73,9 @@ Re-enter new password:
7373
Enter LDAP Password:
7474
```
7575

76-
### Add the mcsAdmin policy to user billy on MinIO
76+
### Add the consoleAdmin policy to user billy on MinIO
7777
```
78-
$ cat > mcsAdmin.json << EOF
78+
$ cat > consoleAdmin.json << EOF
7979
{
8080
"Version": "2012-10-17",
8181
"Statement": [
@@ -99,8 +99,8 @@ $ cat > mcsAdmin.json << EOF
9999
]
100100
}
101101
EOF
102-
$ mc admin policy add myminio mcsAdmin mcsAdmin.json
103-
$ mc admin policy set myminio mcsAdmin user=billy
102+
$ mc admin policy add myminio consoleAdmin consoleAdmin.json
103+
$ mc admin policy set myminio consoleAdmin user=billy
104104
```
105105

106106
## Run MinIO
@@ -116,12 +116,12 @@ export MINIO_IDENTITY_LDAP_SERVER_INSECURE=on
116116
./minio server ~/Data
117117
```
118118

119-
## Run MCS
119+
## Run Console
120120

121121
```
122-
export MCS_ACCESS_KEY=minio
123-
export MCS_SECRET_KEY=minio123
122+
export CONSOLE_ACCESS_KEY=minio
123+
export CONSOLE_SECRET_KEY=minio123
124124
...
125-
export MCS_LDAP_ENABLED=on
126-
./mcs server
125+
export CONSOLE_LDAP_ENABLED=on
126+
./console server
127127
```

Dockerfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ FROM golang:1.13
22

33
RUN apt-get update -y && apt-get install -y ca-certificates
44

5-
ADD go.mod /go/src/github.com/minio/mcs/go.mod
6-
ADD go.sum /go/src/github.com/minio/mcs/go.sum
7-
WORKDIR /go/src/github.com/minio/mcs/
5+
ADD go.mod /go/src/github.com/minio/console/go.mod
6+
ADD go.sum /go/src/github.com/minio/console/go.sum
7+
WORKDIR /go/src/github.com/minio/console/
88

99
# Get dependencies - will also be cached if we won't change mod/sum
1010
RUN go mod download
1111

12-
ADD . /go/src/github.com/minio/mcs/
13-
WORKDIR /go/src/github.com/minio/mcs/
12+
ADD . /go/src/github.com/minio/console/
13+
WORKDIR /go/src/github.com/minio/console/
1414

1515
ENV CGO_ENABLED=0
1616

17-
RUN go build -ldflags "-w -s" -a -o mcs ./cmd/mcs
17+
RUN go build -ldflags "-w -s" -a -o console ./cmd/console
1818

1919
FROM scratch
2020
MAINTAINER MinIO Development "[email protected]"
2121
EXPOSE 9090
2222

2323
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
24-
COPY --from=0 /go/src/github.com/minio/mcs/mcs .
24+
COPY --from=0 /go/src/github.com/minio/console/console .
2525

26-
CMD ["/mcs"]
26+
CMD ["/console"]

Dockerfile.release

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM scratch
22
MAINTAINER MinIO Development "[email protected]"
33
EXPOSE 9090
4-
COPY mcs /mcs
4+
COPY console /console
55

6-
ENTRYPOINT ["/mcs"]
6+
ENTRYPOINT ["/console"]

Makefile

+16-16
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ GOPATH := $(shell go env GOPATH)
33
# Sets the build version based on the output of the following command, if we are building for a tag, that's the build else it uses the current git branch as the build
44
BUILD_VERSION:=$(shell git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null || git rev-parse --abbrev-ref HEAD 2>/dev/null)
55
BUILD_TIME:=$(shell date 2>/dev/null)
6-
TAG ?= "minio/m3:$(VERSION)-dev"
6+
TAG ?= "minio/console:$(VERSION)-dev"
77

8-
default: mcs
8+
default: console
99

10-
.PHONY: mcs
11-
mcs:
12-
@echo "Building mcs binary to './mcs'"
13-
@(GO111MODULE=on CGO_ENABLED=0 go build -trimpath --tags=kqueue --ldflags "-s -w" -o mcs ./cmd/mcs)
10+
.PHONY: console
11+
console:
12+
@echo "Building Console binary to './console'"
13+
@(GO111MODULE=on CGO_ENABLED=0 go build -trimpath --tags=kqueue --ldflags "-s -w" -o console ./cmd/console)
1414

1515
k8sdev:
1616
@docker build -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' .
1717
@kind load docker-image $(TAG)
18-
@echo "Done, now restart your mcs deployment"
18+
@echo "Done, now restart your console deployment"
1919

2020
getdeps:
2121
@mkdir -p ${GOPATH}/bin
@@ -33,32 +33,32 @@ lint:
3333
@GO111MODULE=on ${GOPATH}/bin/golangci-lint cache clean
3434
@GO111MODULE=on ${GOPATH}/bin/golangci-lint run --timeout=5m --config ./.golangci.yml
3535

36-
install: mcs
37-
@echo "Installing mcs binary to '$(GOPATH)/bin/mcs'"
38-
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/mcs $(GOPATH)/bin/mcs
39-
@echo "Installation successful. To learn more, try \"mcs --help\"."
36+
install: console
37+
@echo "Installing console binary to '$(GOPATH)/bin/console'"
38+
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/console $(GOPATH)/bin/console
39+
@echo "Installation successful. To learn more, try \"console --help\"."
4040

4141
swagger-gen:
4242
@echo "Generating swagger server code from yaml"
4343
@rm -rf models
4444
@rm -rf restapi/operations
45-
@swagger generate server -A mcs --main-package=mcs --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
45+
@swagger generate server -A console --main-package=console --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
4646

4747
assets:
4848
@(cd portal-ui; yarn install; make build-static; cd ..)
4949

5050
test:
51-
@(GO111MODULE=on go test -race -v github.com/minio/mcs/restapi/...)
52-
@(GO111MODULE=on go test -race -v github.com/minio/mcs/pkg/...)
51+
@(GO111MODULE=on go test -race -v github.com/minio/console/restapi/...)
52+
@(GO111MODULE=on go test -race -v github.com/minio/console/pkg/...)
5353

5454
coverage:
55-
@(GO111MODULE=on go test -v -coverprofile=coverage.out github.com/minio/mcs/restapi/... && go tool cover -html=coverage.out && open coverage.html)
55+
@(GO111MODULE=on go test -v -coverprofile=coverage.out github.com/minio/console/restapi/... && go tool cover -html=coverage.out && open coverage.html)
5656

5757
clean:
5858
@echo "Cleaning up all the generated files"
5959
@find . -name '*.test' | xargs rm -fv
6060
@find . -name '*~' | xargs rm -fv
61-
@rm -vf mcs
61+
@rm -vf console
6262

6363
docker:
6464
@docker build -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' .

README.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ A graphical user interface for [MinIO](https://github.com/minio/minio)
99

1010
## Setup
1111

12-
All `mcs` needs is a MinIO user with admin privileges and URL pointing to your MinIO deployment.
12+
All `console` needs is a MinIO user with admin privileges and URL pointing to your MinIO deployment.
1313
> Note: We don't recommend using MinIO's Operator Credentials
1414
15-
1. Create a user for `mcs` using `mc`.
15+
1. Create a user for `console` using `mc`.
1616
```
1717
$ set +o history
18-
$ mc admin user add myminio mcs YOURMCSSECRET
18+
$ mc admin user add myminio console YOURCONSOLESECRET
1919
$ set -o history
2020
```
2121

22-
2. Create a policy for `mcs` with access to everything (for testing and debugging)
22+
2. Create a policy for `console` with access to everything (for testing and debugging)
2323

2424
```
25-
$ cat > mcsAdmin.json << EOF
25+
$ cat > consoleAdmin.json << EOF
2626
{
2727
"Version": "2012-10-17",
2828
"Statement": [{
@@ -45,18 +45,18 @@ $ cat > mcsAdmin.json << EOF
4545
]
4646
}
4747
EOF
48-
$ mc admin policy add myminio mcsAdmin mcsAdmin.json
48+
$ mc admin policy add myminio consoleAdmin consoleAdmin.json
4949
```
5050

51-
3. Set the policy for the new `mcs` user
51+
3. Set the policy for the new `console` user
5252

5353
```
54-
$ mc admin policy set myminio mcsAdmin user=mcs
54+
$ mc admin policy set myminio consoleAdmin user=console
5555
```
5656

5757

5858
### Note
59-
Additionally, you can create policies to limit the privileges for `mcs` users, for example, if you want the user to only have access to dashboard, buckets, notifications and watch page, the policy should look like this:
59+
Additionally, you can create policies to limit the privileges for `console` users, for example, if you want the user to only have access to dashboard, buckets, notifications and watch page, the policy should look like this:
6060
```
6161
{
6262
"Version": "2012-10-17",
@@ -97,34 +97,34 @@ Additionally, you can create policies to limit the privileges for `mcs` users, f
9797
}
9898
```
9999

100-
## Run MCS server
100+
## Run Console server
101101
To run the server:
102102

103103
```
104-
export MCS_HMAC_JWT_SECRET=YOURJWTSIGNINGSECRET
104+
export CONSOLE_HMAC_JWT_SECRET=YOURJWTSIGNINGSECRET
105105
106106
#required to encrypt jwet payload
107-
export MCS_PBKDF_PASSPHRASE=SECRET
107+
export CONSOLE_PBKDF_PASSPHRASE=SECRET
108108
109109
#required to encrypt jwet payload
110-
export MCS_PBKDF_SALT=SECRET
110+
export CONSOLE_PBKDF_SALT=SECRET
111111
112-
export MCS_ACCESS_KEY=mcs
113-
export MCS_SECRET_KEY=YOURMCSSECRET
114-
export MCS_MINIO_SERVER=http://localhost:9000
115-
./mcs server
112+
export CONSOLE_ACCESS_KEY=console
113+
export CONSOLE_SECRET_KEY=YOURCONSOLESECRET
114+
export CONSOLE_MINIO_SERVER=http://localhost:9000
115+
./console server
116116
```
117117

118-
## Connect MCS to a Minio using TLS and a self-signed certificate
118+
## Connect Console to a Minio using TLS and a self-signed certificate
119119

120120
```
121121
...
122-
export MCS_MINIO_SERVER_TLS_ROOT_CAS=<certificate_file_name>
123-
export MCS_MINIO_SERVER=https://localhost:9000
124-
./mcs server
122+
export CONSOLE_MINIO_SERVER_TLS_ROOT_CAS=<certificate_file_name>
123+
export CONSOLE_MINIO_SERVER=https://localhost:9000
124+
./console server
125125
```
126126

127127
You can verify that the apis work by doing the request on `localhost:9090/api/v1/...`
128128

129-
# Contribute to mcs Project
130-
Please follow mcs [Contributor's Guide](https://github.com/minio/mcs/blob/master/CONTRIBUTING.md)
129+
# Contribute to console Project
130+
Please follow console [Contributor's Guide](https://github.com/minio/console/blob/master/CONTRIBUTING.md)

SECURITY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Supported Versions
44

5-
We always provide security updates for the [latest release](https://github.com/minio/mcs/releases/latest).
5+
We always provide security updates for the [latest release](https://github.com/minio/console/releases/latest).
66
Whenever there is a security update you just need to upgrade to the latest version.
77

88
## Reporting a Vulnerability
99

10-
All security bugs in [minio/mcs](https://github,com/minio/mcs) (or other minio/* repositories)
10+
All security bugs in [minio/console](https://github,com/minio/console) (or other minio/* repositories)
1111
should be reported by email to [email protected]. Your email will be acknowledged within 48 hours,
1212
and you'll receive a more detailed response to your email within 72 hours indicating the next steps
1313
in handling your report.

0 commit comments

Comments
 (0)