- [License & Copyright](#license & copyright)
- Requirements
- Configuration
- Usage
Allow to have a privately hosted apt repository on S3. Access keys are read from
/etc/apt/s3auth.conf
file or IAM role if machine is hosted on AWS or has
access to AWS metadata server on 169.254.169.254.
# Copyright (C) 2014 Bashton Ltd.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
- python-configobj
/etc/apt/s3auth.conf or IAM role can provide credentials required for using private apt repositories.
Example of s3auth.conf file:
AccessKeyId = myaccesskey
SecretAccessKey = mysecretaccesskey
Token = ''
Token should be empty string.
Example of an IAM Policy (noting the ARN differs in China):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1247539516000",
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
],
"Resource": [
"*"
]
},
{
"Sid": "Stmt1247539516001",
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::aptbucketname/*"
]
}
]
}
Install the .deb package from the releases page. The bucket repo should be specified using an s3:// prefix and with a URL conforming to the standard for that region. For example:
deb s3://s3.amazonaws.com/aptbucketname/repo/ trusty main contrib non-free
deb s3://s3-us-west-1.amazonaws.com/aptbucketname/repo/ trusty main contrib non-free
deb s3://s3.cn-north-1.amazonaws.com.cn/aptbucketname/repo/ trusty main contrib non-free
This has been tested on the following flavours:
- Ubuntu 14.04 (Trusty)
- Ubuntu 12.04 (Precise)
This has been tested against the following regions:
- cn-north-1
- us-west-1