Difference between revisions of "Apt repository hosting"

From Eitan Burcat
Jump to navigation Jump to search
(Created page with "[http://aptly.info Aptly] looks promising. Had quirk with publishing to us-east-1 on S3: http://www.aptly.info/doc/feature/s3/. Bypassed by using eu-west-1. Troubleshooting S...")
 
Line 47: Line 47:
       "acl":"public-read"
       "acl":"public-read"
     }
     }
}
   },
   },
   "SwiftPublishEndpoints": {}
   "SwiftPublishEndpoints": {}

Revision as of 07:39, 31 August 2015

Aptly looks promising.

Had quirk with publishing to us-east-1 on S3: http://www.aptly.info/doc/feature/s3/. Bypassed by using eu-west-1. Troubleshooting S3 with GoLang was interesting :)

For a private repository, I borrowed an idea from here: http://skife.org/apt/aws/2012/10/12/private-apt-repos-in-s3.html (apt-transport-s3 - depended on cdbs on my machine, which was not mentioned in its docs).

Things I'm still unsure of:

  • Publishing my public keys.
  • Will CloudFront work OK? Caching can be a pain.
  • Automating publishing of packages with Aptly, and an easy way to control which packages are published.
  • Maybe there's a simpler solution than using s3-apt-transport?
  • Safe distribution of the AWS Access and Secret keys to users.
  • How do I choose which fork to fix the documentation of the apt-transport-s3 dependency?

My aptly configuration and some commands:

{
  "rootDir": "/home/eburcat/.aptly",
  "downloadConcurrency": 4,
  "downloadSpeedLimit": 0,
  "architectures": [],
  "dependencyFollowSuggests": false,
  "dependencyFollowRecommends": false,
  "dependencyFollowAllVariants": false,
  "dependencyFollowSource": false,
  "gpgDisableSign": false,
  "gpgDisableVerify": false,
  "downloadSourcePackages": false,
  "ppaDistributorID": "ubuntu",
  "ppaCodename": "",
  "S3PublishEndpoints": {
    "eburcat.private":{
      "awsAccessKeyID":"",
      "awsSecretAccessKey":"",
      "region":"eu-west-1",
      "bucket":"repo.eburcat.com",
      "prefix":"private",
      "acl":"private",
      "encryptionMethod":"AES256"
    },
    "eburcat.public":{
      "awsAccessKeyID":"",
      "awsSecretAccessKey":"",
      "region":"eu-west-1",
      "bucket":"repo.eburcat.com",
      "prefix":"public",
      "acl":"public-read"
    }
  },
  "SwiftPublishEndpoints": {}
}

aptly repo create -distribution=precise -component=main eburcat-public
aptly repo add eburcat-public apt-transport-s3_1.1.1ubuntu2_amd64.deb
aptly repo add eburcat-public apt-transport-s3_1.1.1ubuntu2.dsc
aptly snapshot create eburcat-public-0.01 from repo eburcat-public
aptly publish snapshot eburcat-public-0.01 s3:eburcat.public:

aptly repo create -distribution=precise -component=main eburcat-release
aptly repo add eburcat-release my-package_1.0_amd64.deb
aptly snapshot create eburcat-0.01 from repo eburcat-release
aptly publish snapshot eburcat-0.01 s3:eburcat.private: