|
1 | | -# UCloud Plugins |
| 1 | +The UCloud plugin is able to build customized images based on an existing base image for use in UHost Instance. |
2 | 2 |
|
3 | | -The UCloud plugin is able to build |
4 | | -customized images based on an existing base image for use in UHost Instance. |
5 | | - |
6 | | -## Components |
7 | | - |
8 | | -The Scaffolding plugin is intended as a starting point for creating Packer plugins, containing: |
9 | | - |
10 | | -### Builders |
11 | | - |
12 | | -- [ucloud-uhost](/docs/builders/uhost.mdx) - The `ucloud-uhost` builder provides the capability to build |
13 | | - customized images based on an existing base image for use in UHost Instance. |
14 | | - |
15 | | -### Post-processors |
16 | | - |
17 | | -- [ucloud-import](/docs/post-processors/import.mdx) - The UCloud Import post-processor takes the RAW, VHD, VMDK, or qcow2 |
18 | | - artifact from various builders and imports it to UCloud customized image list |
19 | | - for UHost Instance. |
20 | | - |
21 | | -## Installation |
22 | | - |
23 | | -### Using pre-built releases |
24 | | - |
25 | | -#### Using the `packer init` command |
26 | | - |
27 | | -Starting from version 1.7, Packer supports a new `packer init` command allowing |
28 | | -automatic installation of Packer plugins. Read the |
29 | | -[Packer documentation](https://www.packer.io/docs/commands/init) for more information. |
30 | | - |
31 | | -To install this plugin, copy and paste this code into your Packer configuration . |
32 | | -Then, run [`packer init`](https://www.packer.io/docs/commands/init). |
| 3 | +### Installation |
| 4 | +To install this plugin add this code into your Packer configuration and run [packer init](/packer/docs/commands/init) |
33 | 5 |
|
34 | 6 | ```hcl |
35 | 7 | packer { |
36 | | - required_plugins { |
37 | | - ucloud = { |
38 | | - version = ">= 1.0.9" |
39 | | - source = "github.com/hashicorp/ucloud" |
| 8 | + required_plugins { |
| 9 | + ucloud = { |
| 10 | + version = "~> 1" |
| 11 | + source = "github.com/hashicorp/ucloud" |
| 12 | + } |
40 | 13 | } |
41 | | - } |
42 | 14 | } |
43 | 15 | ``` |
44 | 16 |
|
45 | | -#### Manual installation |
| 17 | +Alternatively, you can use `packer plugins install` to manage installation of this plugin. |
46 | 18 |
|
47 | | -You can find pre-built binary releases of the plugin [here](https://github.com/hashicorp/packer-plugin-name/releases). |
48 | | -Once you have downloaded the latest archive corresponding to your target OS, |
49 | | -uncompress it to retrieve the plugin binary file corresponding to your platform. |
50 | | -To install the plugin, please follow the Packer documentation on |
51 | | -[installing a plugin](https://www.packer.io/docs/extending/plugins/#installing-plugins). |
| 19 | +```sh |
| 20 | +packer plugins install github.com/hashicorp/ucloud |
| 21 | +``` |
| 22 | +### Components |
52 | 23 |
|
| 24 | +#### Builders |
53 | 25 |
|
54 | | -#### From Source |
| 26 | +- [ucloud-uhost](/packer/integrations/BrandonRomano/ucloud/latest/components/builder/uhost) - The `ucloud-uhost` builder provides the capability to build |
| 27 | + customized images based on an existing base image for use in UHost Instance. |
| 28 | + |
| 29 | +#### Post-processors |
55 | 30 |
|
56 | | -If you prefer to build the plugin from its source code, clone the GitHub |
57 | | -repository locally and run the command `go build` from the root |
58 | | -directory. Upon successful compilation, a `packer-plugin-ucloud` plugin |
59 | | -binary file can be found in the root directory. |
60 | | -To install the compiled plugin, please follow the official Packer documentation |
61 | | -on [installing a plugin](https://www.packer.io/docs/extending/plugins/#installing-plugins). |
| 31 | +- [ucloud-import](/packer/integrations/BrandonRomano/uhost/latest/components/post-processor/import) - The UCloud Import post-processor takes the RAW, VHD, VMDK, or qcow2 |
| 32 | + artifact from various builders and imports it to UCloud customized image list |
| 33 | + for UHost Instance. |
0 commit comments