问题
因为我的nexus是安装在EC2上面,需要利用s3的存储能力,为nexus提供存储服务。
步骤
准备s3桶
输入桶名,创建s3桶,如下图:
创建桶读写策略
具体内容如下:
{"Version": "2012-10-17","Statement": [{"Sid": "NexusS3BlobStoreAccess","Effect": "Allow","Action": ["s3:PutObject","s3:GetObject","s3:DeleteObject","s3:ListBucket","s3:GetLifecycleConfiguration","s3:PutLifecycleConfiguration","s3:PutObjectTagging","s3:GetObjectTagging","s3:DeleteObjectTagging","s3:GetBucketAcl","s3:DeleteBucket","s3:CreateBucket"],"Resource": ["arn:aws:s3:::桶名","arn:aws:s3:::桶名/*"]}]
}
创建IAM用户
创建一个IAM用户,并绑定上述桶读写策略,如下图:
创建该用户的访问密钥,如下图:
并将这个IAM用户的访问密钥,配置给nexus3。
创建nexus的s3存储
创建入口如下图:
s3存储设置如下:
注意,这里需要设置用户的访问key,如下图:
参考
- Configuring Blob Stores