Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bo-Chun Chen
hpc-factory
Commits
ee027cd8
Commit
ee027cd8
authored
5 months ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
feat: add app-template packer template
parent
6a2cc9bb
Branches
feat-packer-template
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app-template/README.md
+1
-0
1 addition, 0 deletions
app-template/README.md
app-template/nodeimage.pkr.hcl
+47
-0
47 additions, 0 deletions
app-template/nodeimage.pkr.hcl
app-template/variables.pkr.hcl
+102
-0
102 additions, 0 deletions
app-template/variables.pkr.hcl
with
150 additions
and
0 deletions
app-template/README.md
0 → 100644
+
1
−
0
View file @
ee027cd8
This a packer hcl template for creating a image. For documentation on packer, see
[
here
](
https://www.packer.io/docs
)
; for information about the openstack-specific builder, see
[
here
](
https://www.packer.io/plugins/builders/openstack
)
This diff is collapsed.
Click to expand it.
app-template/nodeimage.pkr.hcl
0 → 100644
+
47
−
0
View file @
ee027cd8
packer
{
required_plugins
{
openstack
=
{
version
=
"~> 1"
source
=
"github.com/hashicorp/openstack"
}
ansible
=
{
version
=
"~> 1"
source
=
"github.com/hashicorp/ansible"
}
}
}
source
"openstack"
"example"
{
skip_create_image
=
var
.
skip_create_image
image_name
=
local
.
local_image_name
source_image
=
var
.
source_image
image_members
=
var
.
image_membership
image_auto_accept_members
=
var
.
auto_accept_members
image_tags
=
var
.
image_tags
image_disk_format
=
var
.
image_format
volume_size
=
var
.
volume_size
flavor
=
var
.
flavor
instance_name
=
var
.
build_instance_name
use_blockstorage_volume
=
true
floating_ip_network
=
var
.
floating_ip_network
networks
=
var
.
networks
security_groups
=
var
.
security_groups
ssh_username
=
var
.
ssh_username
}
build
{
sources
=
[
"source.openstack.example"
]
provisioner
"shell"
{
inline
=
[
"echo Hello"
,
"echo from `hostname`"
]
}
# For more provision, check at https://developer.hashicorp.com/packer/docs/provisioners
# Example of ansible provisioner:
provisioner
"ansible"
{
playbook_file
=
"./ansible/playbook.yml"
}
}
This diff is collapsed.
Click to expand it.
app-template/variables.pkr.hcl
0 → 100644
+
102
−
0
View file @
ee027cd8
variable
"root_ssh_key"
{
type
=
string
default
=
""
description
=
"The root key to use for ssh"
}
variable
"image_name"
{
type
=
string
default
=
"cluster-image"
description
=
"Name of the image in openstack"
}
variable
"image_format"
{
type
=
string
default
=
"qcow2"
description
=
"The format of the resulting image"
}
variable
"image_tags"
{
type
=
list
(
string
)
default
=
[]
description
=
"List of tags to be associated to the resulting image"
}
variable
"image_membership"
{
type
=
list
(
string
)
default
=
[]
description
=
"Projects/tenants to share the image in openstack with"
}
variable
"auto_accept_members"
{
type
=
bool
default
=
false
description
=
"A boolean value for auto accepting image in the projects/tenants defined in image_membership."
}
variable
"skip_create_image"
{
type
=
bool
default
=
false
description
=
"A boolean value for skipping image creation at the end of the build"
}
variable
"source_image"
{
type
=
string
default
=
""
description
=
"The name of the source image to use"
}
variable
"flavor"
{
type
=
string
default
=
""
description
=
"The name of the flavor to use"
}
variable
"floating_ip_network"
{
type
=
string
default
=
"uab-campus"
description
=
"floating ip network to use with (temporary) ip assignmnet to a vm"
}
variable
"networks"
{
type
=
list
(
string
)
default
=
[]
description
=
"List of network UUIDs to assign to the network"
}
variable
"security_groups"
{
type
=
list
(
string
)
default
=
[]
description
=
"A list of security groups to add - you should make sure ssh access is open to the machine"
}
variable
"build_instance_name"
{
type
=
string
default
=
"ood"
description
=
"A name of build instance used for image build"
}
variable
"ssh_username"
{
type
=
string
default
=
"centos"
description
=
"The default username to use for SSH"
}
variable
"volume_size"
{
type
=
number
default
=
20
description
=
"The default volume size for building iamge"
}
variable
"ANSIBLE_DEBUG"
{
type
=
string
default
=
"false"
description
=
"to turn on debugging"
}
variable
"ANSIBLE_VERBOSITY"
{
type
=
string
default
=
"0"
description
=
"to increase verbosity - 0|1|2|3|4"
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment