Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chroot environment doc for minio #5366

Merged
merged 1 commit into from Jan 12, 2018

Conversation

harshavardhana
Copy link
Member

@harshavardhana harshavardhana commented Jan 6, 2018

Description

Add chroot environment doc for minio

Motivation and Context

Fixes #4659

How Has This Been Tested?

Following the doc

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added unit tests to cover my changes.
  • I have added/updated functional tests in mint. (If yes, add mint PR # here: )
  • All new and existing tests passed.

@balamurugana

This comment has been minimized.

@codecov
Copy link

codecov bot commented Jan 6, 2018

Codecov Report

Merging #5366 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5366      +/-   ##
=========================================
- Coverage   61.11%   61.1%   -0.02%     
=========================================
  Files         201     201              
  Lines       29520   29520              
=========================================
- Hits        18042   18039       -3     
- Misses      10087   10091       +4     
+ Partials     1391    1390       -1
Impacted Files Coverage Δ
cmd/fs-v1-background-append.go 75.16% <0%> (-3.36%) ⬇️
cmd/notify-webhook.go 74.63% <0%> (-0.73%) ⬇️
cmd/fs-v1-rwpool.go 66.95% <0%> (+2.6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b721d7...5247783. Read the comment docs.


## 2. Install Minio in Chroot
```sh
mkdir /mnt/export/${USER}/bin
Copy link
Contributor

@nitisht nitisht Jan 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably mkdir -p /mnt/export/${USER}/bin is better as I dont see /mnt/export directory by default

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

## 2. Install Minio in Chroot
```sh
mkdir /mnt/export/${USER}/bin
wget https://dl.minio.io/server/minio/release/linux-amd64/minio -O /mnt/export/${USER}/bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wget https://dl.minio.io/server/minio/release/linux-amd64/minio -O /mnt/export/${USER}/bin/minio

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

mkdir /mnt/export/${USER}/bin
wget https://dl.minio.io/server/minio/release/linux-amd64/minio -O /mnt/export/${USER}/bin
chmod +x /mnt/export/${USER}/bin/minio
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably $cd /mnt/export/${USER}/bin should be added here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why cd ?

@balamurugana
Copy link
Member

Error running mint automation
+ mkdir -p 5366/gopath/src/github.com/minio
+ git -C 5366/gopath/src/github.com/minio clone --quiet https://github.com/minio/minio.git
fatal: destination path 'minio' already exists and is not an empty directory.

@harshavardhana
Copy link
Member Author

@nitisht PTAL addressed your comments.. @donatello ping

nitisht
nitisht previously approved these changes Jan 9, 2018
Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

nitisht
nitisht previously approved these changes Jan 9, 2018
### GNU/Linux
```sh
chroot --userspec ${USER}:{USER} /mnt/export/${USER} /bin/minio --config-dir=/.minio server /data

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should specify that this command would need to be executed by root.

Also s/${USER}:{USER}/${USER}:${USER}. Alternatively we should specify that after : the group name can be given.

Finally, when I tried it, I couldn't get it to work:

$ find /tmp/chroot/
/tmp/chroot/
/tmp/chroot/bin
/tmp/chroot/bin/minio
/tmp/chroot/ls
$ sudo chroot --userspec aditya:aditya /tmp/chroot/ /bin/minio --config-dir=/.minio server /data
FATA[0000] Invalid command line arguments server=‘:9000’, args=[/data]  cause=open /proc/mounts: no such file or directory source=[server-main.go:96:serverHandleCmdArgs()]

@balamurugana
Copy link
Member

Mint Automation

Test Result
mint-xl.sh more...
mint-fs.sh more...
mint-dist-xl.sh more...
mint-gateway-s3.sh more...
mint-gateway-azure.sh more...

5366-5247783/mint-xl.sh.log:

Running with
SERVER_ENDPOINT: minikube:30433
ACCESS_KEY:      minio
SECRET_KEY:      ***REDACTED***
ENABLE_HTTPS:    0
SERVER_REGION:   us-east-1
MINT_DATA_DIR:   /mint/data
MINT_MODE:       core

To get logs, run 'docker cp 1db6d303df68:/mint/log /tmp/mint-logs'
(1/11) Running aws-sdk-go tests ... done in 0 seconds
(2/11) Running aws-sdk-php tests ... done in 51 seconds
(3/11) Running aws-sdk-ruby tests ... done in 6 seconds
(4/11) Running awscli tests ... done in 3 minutes and 53 seconds
(5/11) Running mc tests ... done in 1 minutes and 57 seconds
(6/11) Running minio-dotnet tests ... FAILED in 3 minutes and 6 seconds

Unhandled Exception: System.AggregateException: One or more errors occurred. (Assert.Fail failed. ) ---> Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.Fail failed. 
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFail(String assertionName, String message, Object[] parameters)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail()
   at Minio.Functional.Tests.FunctionalTest.<PutObject_Task>d__52.MoveNext() in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 755
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Minio.Functional.Tests.FunctionalTest.<ListObjects_Test5>d__72.MoveNext() in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 1633
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Minio.Functional.Tests.FunctionalTest.Main(String[] args) in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 216

Executed 5 out of 11 tests successfully.

5366-5247783/mint-gateway-azure.sh.log:

Running with
SERVER_ENDPOINT: minikube:31373
ACCESS_KEY:      minioazure1
SECRET_KEY:      ***REDACTED***
ENABLE_HTTPS:    0
SERVER_REGION:   us-east-1
MINT_DATA_DIR:   /mint/data
MINT_MODE:       core

To get logs, run 'docker cp d02d89e7e9fd:/mint/log /tmp/mint-logs'
(1/11) Running aws-sdk-go tests ... done in 0 seconds
(2/11) Running aws-sdk-php tests ... done in 1 minutes and 7 seconds
(3/11) Running aws-sdk-ruby tests ... done in 27 seconds
(4/11) Running awscli tests ... done in 5 minutes and 9 seconds
(5/11) Running mc tests ... done in 4 minutes and 49 seconds
(6/11) Running minio-dotnet tests ... FAILED in 2 minutes and 43 seconds

Unhandled Exception: System.AggregateException: One or more errors occurred. (Assert.Fail failed. ) ---> Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.Fail failed. 
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFail(String assertionName, String message, Object[] parameters)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail()
   at Minio.Functional.Tests.FunctionalTest.<PutObject_Task>d__52.MoveNext() in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 755
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Minio.Functional.Tests.FunctionalTest.<ListObjects_Test5>d__72.MoveNext() in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 1633
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Minio.Functional.Tests.FunctionalTest.Main(String[] args) in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 216

Executed 5 out of 11 tests successfully.

5366-5247783/mint-dist-xl.sh.log:

Running with
SERVER_ENDPOINT: minikube:32626
ACCESS_KEY:      minio
SECRET_KEY:      ***REDACTED***
ENABLE_HTTPS:    0
SERVER_REGION:   us-east-1
MINT_DATA_DIR:   /mint/data
MINT_MODE:       core

To get logs, run 'docker cp e578dd57c4b8:/mint/log /tmp/mint-logs'
(1/11) Running aws-sdk-go tests ... FAILED in 4 seconds
{
  "alert": "",
  "args": {
    "bucketName": "aws-sdk-go-test-bgdvu56vgferi3",
    "expiry": 60000000000,
    "objectName": "presignedTest"
  },
  "duration": 4440,
  "error": "RequestError: send request failed\ncaused by: Put http://minikube:32626/aws-sdk-go-test-bgdvu56vgferi3: dial tcp 192.168.122.196:32626: getsockopt: connection refused",
  "function": "PresignedPut",
  "message": "AWS SDK Go CreateBucket Failed",
  "name": "aws-sdk-go",
  "status": "FAIL"
}

Executed 0 out of 11 tests successfully.

5366-5247783/mint-fs.sh.log:

Running with
SERVER_ENDPOINT: minikube:31000
ACCESS_KEY:      minio
SECRET_KEY:      ***REDACTED***
ENABLE_HTTPS:    0
SERVER_REGION:   us-east-1
MINT_DATA_DIR:   /mint/data
MINT_MODE:       core

To get logs, run 'docker cp 3d01f1fa8b28:/mint/log /tmp/mint-logs'
(1/11) Running aws-sdk-go tests ... done in 0 seconds
(2/11) Running aws-sdk-php tests ... done in 45 seconds
(3/11) Running aws-sdk-ruby tests ... done in 5 seconds
(4/11) Running awscli tests ... done in 3 minutes and 45 seconds
(5/11) Running mc tests ... done in 1 minutes and 24 seconds
(6/11) Running minio-dotnet tests ... FAILED in 1 minutes and 32 seconds

Unhandled Exception: System.AggregateException: One or more errors occurred. (Assert.Fail failed. ) ---> Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.Fail failed. 
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFail(String assertionName, String message, Object[] parameters)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail()
   at Minio.Functional.Tests.FunctionalTest.<PutObject_Task>d__52.MoveNext() in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 755
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Minio.Functional.Tests.FunctionalTest.<ListObjects_Test5>d__72.MoveNext() in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 1633
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Minio.Functional.Tests.FunctionalTest.Main(String[] args) in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 216

Executed 5 out of 11 tests successfully.

5366-5247783/mint-gateway-s3.sh.log:

Running with
SERVER_ENDPOINT: minikube:31159
ACCESS_KEY:      AKIAJH7GQKYNU3C2ADXA
SECRET_KEY:      ***REDACTED***
ENABLE_HTTPS:    0
SERVER_REGION:   us-east-1
MINT_DATA_DIR:   /mint/data
MINT_MODE:       core

To get logs, run 'docker cp ebbf8ae8ce83:/mint/log /tmp/mint-logs'
(1/11) Running aws-sdk-go tests ... done in 2 seconds
(2/11) Running aws-sdk-php tests ... done in 1 minutes and 12 seconds
(3/11) Running aws-sdk-ruby tests ... done in 51 seconds
(4/11) Running awscli tests ... done in 5 minutes and 17 seconds
(5/11) Running mc tests ... done in 4 minutes and 6 seconds
(6/11) Running minio-dotnet tests ... done in 5 minutes and 50 seconds
(7/11) Running minio-go tests ... done in 5 minutes and 0 seconds
(8/11) Running minio-java tests ... FAILED in 34 seconds
{
  "name": "minio-java",
  "function": "setBucketPolicy(String bucketName, String objectPrefix, PolicyType policyType)",
  "duration": 4256,
  "status": "FAIL",
  "error": "error occured\nErrorResponse(code=AccessDenied, message=Access Denied., bucketName=null, objectName=null, resource=/minio-java-test-1kfjpq2/set-bucket-policy-read-write/minio-java-test-p5iqdh, requestId=3L137, hostId=3L137)\nrequest={method=GET, url=http://minikube:31159/minio-java-test-1kfjpq2/set-bucket-policy-read-write/minio-java-test-p5iqdh, headers=Host: minikube:31159\nUser-Agent: Minio (amd64; amd64) minio-java/dev\nx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\nx-amz-date: 20180111T120722Z\nAuthorization: AWS4-HMAC-SHA256 Credential=*REDACTED*/20180111/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=*REDACTED*\n}\nresponse={code=403, headers=Accept-Ranges: bytes\nContent-Type: application/xml\nServer: Minio/DEVELOPMENT.2018-01-11T11-41-28Z (linux; amd64)\nVary: Origin\nX-Amz-Request-Id: 1508C00E4603433B\nDate: Thu, 11 Jan 2018 12:07:22 GMT\nTransfer-Encoding: chunked\n}\n >>> [io.minio.MinioClient.execute(MinioClient.java:1201), io.minio.MinioClient.executeGet(MinioClient.java:1294), io.minio.MinioClient.getObject(MinioClient.java:1594), io.minio.MinioClient.getObject(MinioClient.java:1506), FunctionalTest.testSetBucketPolicy(FunctionalTest.java:2291), FunctionalTest.setBucketPolicy_test4(FunctionalTest.java:2346), FunctionalTest.runQuickTests(FunctionalTest.java:2649), FunctionalTest.main(FunctionalTest.java:2691)]"
}

Executed 7 out of 11 tests successfully.

@nitisht nitisht merged commit 4b2d04c into minio:master Jan 12, 2018
@harshavardhana harshavardhana deleted the deployment-doc branch January 12, 2018 02:32
kaankabalak pushed a commit to kaankabalak/minio that referenced this pull request Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: Add deployment documentation for chroot based minio deployments.
4 participants