This guide provides a step-by-step walkthrough for getting you CORTX-Management-Portal ready.
- 1.0 Prerequisites
- 1.2 1.2 Setup the Development Environment Locally
- 1.3 Run Unit Test
- 1.4 Deploy the CORTX-Management-Portal on your VM
- 1.5 Run Cortx-Management-Portal UI
- 1.6 REST API document
Before you begin
-
You'll need to install CORTX-Manager or Import OVA.
-
Login as a super user:
$ sudo su
Or
$ sudo -s
-
Install Node.js
$ wget https://nodejs.org/dist/v12.13.0/node-v12.13.0-linux-x64.tar.xz $ tar -xvf node-v12.13.0-linux-x64.tar.xz $ mkdir /opt/nodejs $ cp -r node-v12.13.0-linux-x64 /opt/nodejs/ $ ln -s /opt/nodejs/node-v12.13.0-linux-x64/bin/node /usr/bin node $ ln -s /opt/nodejs/node-v12.13.0-linux-x64/bin/npm /usr/bin npm
-
Install GitHub
Refer to the Contributing to CORTX Management Portal document to install GitHub and clone cortx-manager & dependent repositories.
Setup the GUI Development Environment Locally
- Click open the UI repository link here.
- Clone the UI repository using this URL in new folder and run:
$ git clone https://github.com/Seagate/cortx-cortx-management-portal.git
-
Run the following command to install dependent packages:
\cortx-management-portal\gui
-
Run
$ npm install
or$ npm i
:\cortx-management-portal\gui
Setup the Web Development Environment Locally
- Click open the UI repository link here.
- Clone the UI repository using this URL in new folder and run:
$ git clone https://github.com/Seagate/cortx-cortx-management-portal.git
-
Run the following command to install dependent packages:
\cortx-management-portal\web
-
Run
$ npm install
or$ npm i
:\cortx-management-portal\web
-
Change the proxy in the
vue.config.js
file from the GUI folder to point or access the backend REST API proxy:http://localhost:28100
to the required server proxy:http://10.230.244.254:28101
-
To connect middleware nodejs API, update the
.env
file with a few entries:SERVER_PROTOCOL="https" change to SERVER_PROTOCOL="http" CORTX_MANAGER_HOST="localhost"
-
Change the above to:
CORTX_MANAGEMENT_PORTAL_HOST="10.230.244.254"
-
Change the
LOG_FILE_PATH
to local directory path:LOG_FILE_PATH="H:\\744541\\Documents\\log\\CORTX_MANAGER_middleware.log"
FILE_UPLOAD_FOLDER="H:\\744541\\Documents\\frontend\\file_upload"
-
To serve the UI locally, run the below command via terminal:
\cortx-cortx-management-portal\gui - npm run serve
\cortx-cortx-management-portal\web - npm run dev
-
Open the browser and run http://localhost:8080/.
-
You can run a Unit Test using build RPMs:
Click to expand!
-
RPMs are generated for each pull request, please find RPMS's on below location for the cortx-management-portal:
-
You'll need to install the RPM on your VM.
Before you begin: Ensure you install all dependencies and meet prerequisites.
Deploy CORTX-Management-Portal on VM
-
Login to your VM using SSH your GitHub ID and Password.
-
Remove previously installed cortx-management-portal RPMs (if any):
for pkg in
$ rpm -qa | grep -E "cortx|salt"
;Run
$ yum remove -y $pkg
-
Install cortx-management-portal RPM:
$ yum install -i ./dist/rpmbuild/RPMS/x86_64/cortx-csm_agent-web.rpm
$ yum install -i ./dist/rpmbuild/RPMS/x86_64/cortx-csm_agent-gui.rpm
-
Executing cortx-management-portal-setup commands should pass:
$ cortx_management_portal_setup post_install
$ cortx_management_portal config
$ cortx_management_portal_setup init
-
Enable and Restart the Cortx-Management-Portal service:
$ systemctl restart cortx_management_portal
$ systemctl enable cortx_management_portal
To run the cortx-management-portal node application:
Open a duplicate tab and follow these steps:
-
Login as super user.
-
Change the
.env
file in web for server_protocol fromhttps
tohttp
-
Install node modules.
-
Run cortx-management-portal node application
$ sudo su $ vim /opt/seagate/cortx/cortx-management-portal/.env $ cd /opt/seagate/cortx/cortx-management-portal $ npm install $ npm run dev
-
Once the cortx-management-portal starts successfully, it will return the URL to point to with the port.
-
To run cortx-management-portal UI, open a duplicate tab.
-
Login as a super user.
-
Go to the gui directory.
-
Install node modules.
-
Run gui application:
$ sudo su $ cd /opt/seagate/cortx/cortx-management-portal/cortx/gui/ $ npm install $ npm run serve
-
Once the cortx-management-portal UI, runs successfully, it retuns the URL to the UI.
-
Copy this link and open the UI in the browser.
-
You'll be redirected to the login page.
You'll need to complete the Preboarding and Onboarding steps to start using the CORTX-Management-Portal UI.
Before you begin:
To proceed with login and create your administrator account, navigate to http://:/#/preboarding/welcome.
📃 Note: You can create the admin user only once during setting up the system. The admin user has all the permissions in the system.
You must log in with the admin user and password to continue onboarding configuration.
To start using the CORTX-Management-Portal, you'll need to complete the onboarding process.
Enter the system name and follow the steps below.
Click to expand!
The onboarding process lets you set up the system and configure the following.
A SSL certificate is used on a https connection to encrypt the communication from a S3 Client or your web browser to CORTX Manager. By default, the CORTX Manager uses a CORTX Manager provided self-signed certificate. Alternatively, you can upload a user-provided self-signed certificate or a user provided certificate authority (CA) signed certificate. This step can be done during onboarding or afterwards.
To upload SSL certificate:
- Click Choose File to browse and select the appropriate SSL certificate, and then click Upload certificate.
- Click Continue to open the Management network settings page.
To configure DNS resolver settings:
- On the DNS resolver settings page, enter values for DNS Server and Search Domain.
- Click Apply and Continue to open the Network time protocol (NTP) page.
CORTX and any S3 Clients must be time synchronized via a NTP server. CORTX Manager allows the setting of the NTP server address and a time zone. The time zone on CORTX Manager does not have to match the S3 Client(s). Once the CORTX Manager setting is applied, the setting is then configured on both servers in CORTX.
To configure network time protocol:
- On the Network time protocol (NTP) page, enter NTP server address and select the time zone.
- The selected time zone is used by the system.
- Click Apply and Continue to open the Notifications settings tab.
The system offers you to configure notifications. You can configure the system to receive notification via email using the Simple Network Management Protocol (SNMP). Once configured, you can receive notifications about any system updates or alerts. You have an option to skip configuring the notifications but it is not recommended. It is recommended to configure at least one email to receive system notification.
Table 4: Supported and unsupported email configurations lists the supported and unsupported email configurations.
Type | Supported/Unsupported |
---|---|
By encryption: | |
No encryption | Supported |
SSL/TLS | Supported |
STARTTLS | Supported |
By authentication: | |
SMTP servers which support/require authentication | Supported |
SMTP servers which do not support authentication | Not supported |
To configure notifications:
- From the Notifications page, select the Email check box, and then click Continue.
- Enter values for SMTP server, Sender email, Protocol, SMTP port, Sender password, and Confirm password.
- In the Receiver email addresses, you can enter multiple email addresses separated by comma (,).
- Click Send test email to verify the email configuration. If you do not receive test email on the configured email addresses then check the email configuration.
- Click Apply and Continue to open the Summary page.
The Summary page displays all the onboarding configurations. You can verify the configurations and if required, go back to a page to change the configurations. After verifying the configurations, the system moves to the new IP address added during the configuration. You must use the new IP address to access the system.
To verify the configurations:
- Review the configurations, and then click Continue.
The Confirmation pop-up displays the new IP address of the system. You must use the new IP address to access the system.
CORTX Management Swagger is available here.
The Curl command for getting the URL is:
curl -X GET "https://:28100/api/v1/stats?metric=throughput.read.mb&from=1607481696&to=1607481711&total_sample=1" -H "accept: application/json" -H "authorization: Bearer [AUTH]"
Sample URL:
https://<mgmt_ip>:28100/api/v1/stats?metric=throughput.read.mb&from=1607481696&to=1607481711&total_sample=1
Sample Output:
curl -X GET "https://10.230.255.16:28100/api/v1/auditlogs/show/s3?start_date=1607500000&end_date=1607549999" -H "accept: application/json" -H "authorization: Bearer [AUTH]"
Don't forget to run the command: curl -X POST "https://10.230.255.16:28100/api/v1/login" -H "accept: application/json" -H "Content-Type: application/json" -d "{ "username": "Administrator", "password": "Seagate@1"}"
[ "a9202d6a64d94fa1ac6b6d09a902ae2b84390e4557004d19b4a471cd2525f429 gtbucket1 [10/Dec/2020:00:07:53 +0530]172.16.1.78 847912992506 47b522c3-0bfe-4214-bb58-0bc843235daf REST.GET.BUCKETLOCATION gtbucket1/ GET /gtbucket1?location HTTP/1.1200 - 136 0 6666 - aws-cli/2.1.7 Python/3.7.3 Linux/3.10.0-1127.el7.x86_64 exe/x86_64.centos.7 prompt/off command/s3api.get-bucket-location -SigV4 - AuthHeader 172.16.8.16", "f191c3c1fe654072abfbf1bcba0a0ae626d5fb429ef44574a12882c906814f39 gtbucket [10/Dec/2020:00:07:41 +0530]172.16.1.78 847912992506 85e639c7-40ca-4897-a9a9-c1cb83781a8b REST.GET.BUCKETLOCATION gtbucket/ GET /gtbucket?location HTTP/1.1403 AccessDenied 0 0 6969 - aws-cli/2.1.7 Python/3.7.3 Linux/3.10.0-1127.el7.x86_64 exe/x86_64.centos.7 prompt/off command/s3api.get-bucket-location -SigV4 - AuthHeader 172.16.8.16" ]
We thank you for stopping by to check out the CORTX Community. We are fully dedicated to our mission to build open source technologies that help the world save unlimited data and solve challenging data problems. Join our mission to help reinvent a data-driven world.
Please contribute to the CORTX Open Source project and join our movement to make data storage better, efficient, and more accessible.
You can reach out to us with your questions, feedback, and comments through our [CORTX Communication Channels](/SUPPORT.md