项目作者: kohanyirobert

项目描述 :
Automated Oracle VM VirtualBox Ubuntu build using Packer.
高级语言: Python
项目地址: git://github.com/kohanyirobert/vms.git
创建时间: 2020-09-11T20:48:44Z
项目社区:https://github.com/kohanyirobert/vms

开源协议:Apache License 2.0

下载


vms

Automated Oracle VM VirtualBox Ubuntu build using Packer.

Prerequisites

Note: use these or newer versions for building images.

  • Packer 1.6.5
    • One of xorriso, mkisofs, hdiutil (normally found in macOS) or oscdimg (normally found in Windows as part of the Windows ADK) is required by Packer
  • Oracle VM VirtualBox 6.1.14
  • Oracle VM VirtualBox Guest Additions 6.1.14
  • Oracle VM VirtualBox Extension Pack 6.1.14
  • Vagrant 2.2.14

Install

  1. pip install pipenv
  2. pipenv shell

Build

  • Run python -m lib.build --help for usage information
  • The distro and release must be specified
  • All variants are built automatically to build
  • Add --vagrant to produce Vagrant boxes
  1. python -m lib.build ubuntu 18.04 root base mininet
  • Debug with python -m lib.build --debug --dry-run debian 10.6.10 root

Note: if root is specified it’ll be the first thing to be built, otherwise a packer-{template}-{release}-root named VM must exist with a snapshot attached to it called Root.

Release

  1. Install GitHub CLI
  2. Create one or more personal access token with repo and/or admin:org scoped permissions
  3. Run gh auth login and use one of the tokens
  4. Run python -m lib.release after the build to output the gh command that creates the release
  5. Use python -m lib.release --owner <OWNER> --repo <REPO> to specify which user/organization/repo to create the release at exactly

Vagrant

Vagrant boxes are released through Vagrant Cloud.

  1. Login at https://app.vagrantup.com using an existing account
  2. Create a token and copy/save it somewhere
  3. Login with vagrant cloud auth login --username <username> --token <token>
  4. Create a box if one doesn’t exist yet, e.g. vagrant cloud box create <organization>/<box-name>
  5. Publish an existing local box image, e.g. vagrant cloud publish <organization>/<box-name> <version> virtualbox <path-to-box>

Licenses

  1. Copyright 2020-2021, Kohányi Róbert (<kohanyi.robert@gmail.com>)
  2. Copyright 2012-2019, Chef Software, Inc. (<legal@chef.io>)
  3. Copyright 2011-2012, Tim Dysinger (<tim@dysinger.net>)
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.