java8看不到源码-packer-bento:打包便当

  • j2_323096
    了解作者
  • 23.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-11 05:37
    上传日期
java8 看不到源码#Packer : 便当 如果您在 IT 部门从事交付工作,您迟早会遇到配置服务器基础架构的痛苦。 您不仅需要配置机器和基本操作系统,而且在开始您真正有兴趣完成的任务之前,您还会发现自己需要辛勤地安装和配置必备软件。 幸运的是,这个领域的工具正在不断发展,我经常使用的工具之一是 . Packer 是一种用于为多个平台创建相同机器映像的工具。 我最常使用 Packer 在机器映像上安装和配置必备软件,并使用 virtualbox(或 VMware Fusion)来提供虚拟化环境。 在此类图像的开发过程中,大多数迭代都使用 . 然后,我可以使用这些图像(通常与 结合使用)来部署各种应用程序和服务。 这个存储库包含一组图像源文件,允许我为我最常工作的环境构建图像。 便当盒的概念,其来源高度来源于 ##Repository 组织 对存储库进行组织以促进机器图像定义的组合。 这需要定义基本框和派生框。 Bases box 是从 iso 构建的,并安装指定版本的 Chef。 如果未指定版本,则将安装最新版本。 衍生框是使用现有框作为起点创建的。 通常衍生盒在源盒之上层软件和配
packer-bento-master.zip
内容介绍
#Packer : Bento If you're working in IT in a delivery capacity, sooner or later you will encounter the pain of provisioning server infrastructure. Not only do you need to provision the machine and the base OS, but you'll also find yourself toiling away to install and configure the prerequisite software before you can begin the task you're actually interested in completing. Luckily tooling in this space is evolving and one of the tools that I use a lot is [Packer](https://www.packer.io). Packer is a tool for creating identical machine images for multiple platforms. I most often use Packer in conjunction with [Chef](https://www.chef.io/) to install and configure the prerequisite software on the machine image(s), and virtualbox (or VMware Fusion) to provide the virtualisation environment. During the development of such images the majority of the iterations are performed locally using [VirtualBox](https://www.virtualbox.org/). I can then use these images, typically in conjunction with [Vagrant](https://www.vagrantup.com/), to deploy various applications and services. This repository contains a set of image source files that allow me to build images for the environments in which I work most often. The concept of the bento box, and the source is highly derived from the [Chef Bento project](https://github.com/chef/bento) ##Repository Organisation The repository is organised to facilitate composition of the machine images definitions. This requires the definition of *base boxes* and *derivative boxes*. Bases boxes are built from an iso and install the specified version of Chef. If no version is specified the latest version will be installed. Derivative boxes are created using an existing box as a starting point. Typically derivative boxes layer software and configuration on top of the source box. ###Base Boxes Base boxes are located in the boxes directory. The following base boxes are defined: ####Centos 6.7 x86_64 To create the box you first need to create the var-file. The var-file can contain the following variables: | Variable | Type | Default | Description | | -------- | ----- | ------- | ----------- | | headless | String | *false* | if *true* build the image without displaying the virtualbox GUI. | | chef_version | String | *latest* | if specified install specified version of Chef otherwise install the latest version. | #####Example var-file ``` { "headless" : "true", "chef_version" : "12.6.0" } ``` To create a Centos 6.7 x86_64 base box execute the following command from the root of the repository: ``` packer build -force -var-file=boxes/centos-6.7-x86_64-variables.json boxes/centos-6.7-x86_64-box.json ``` #####Import box into Vagrant ``` vagrant box remove bento/centos-6.7/chef-12.6.0 vagrant box add bento/centos-6.7/chef-12.6.0 builds/centos-6.7-x86_64.virtualbox.box ``` ###Derivative Boxes Derivative boxes are located in sub directories of the boxes directory. The following base boxes are defined: ####Java 8 #####Pre-requisites The Java 8 box can be built from any base box. To create the box you first need to create the var-file. The var-file can contain the following variables: | Variable | Type | Default | Description | | -------- | ----- | ------- | ----------- | | headless | String | *false* | if *true* build the image without displaying the virtualbox GUI. | | base_box | String | | the ovf on which to base this derivative box. | | provider | String | | the virtualisation provider of the base box and derivative box. | #####Example var-file ``` { "headless": "true", "base_box": "centos-6.7-x86_64", "provider": "virtualbox" } ``` To create a Java 8 box execute the following command from the root of the repository: ``` packer build -force -var-file=boxes/java/8/variables.json boxes/java/8/box.json ``` #####Import box into Vagrant ``` vagrant box remove bento/centos-6.7/chef-12.6.0/java-8 vagrant box add bento/centos-6.7/chef-12.6.0/java-8 builds/centos-6.7-x86_64.java8.virtualbox.box ``` #####Jenkins The Jenkins box can be built from *any* Java derivative box. To create the box you first need to create the var-file. The var-file can contain the following variables: | Variable | Type | Default | Description | | -------- | ----- | ------- | ----------- | | headless | String | *false* | if *true* build the image without displaying the virtualbox GUI. | | base_box | String | | the ovf on which to base this derivative box. | | provider | String | | the virtualisation provider of the base box and derivative box. | #####Example var-file ``` { "headless": "true", "base_box": "centos-6.7-x86_64.java8", "provider": "virtualbox" } ``` To create a Jenkins box execute the following command from the root of the repository: ``` packer build -force -var-file=boxes/jenkins/variables.json boxes/jenkins/box.json ``` #####Import box into Vagrant ``` vagrant box remove bento/centos-6.7/chef-12.6.0/java-8/jenkins vagrant box add bento/centos-6.7/chef-12.6.0/java-8/jenkins builds/centos-6.7-x86_64.java8.jenkins.virtualbox.box ```
评论
    相关推荐