Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
terraform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
702
HADOOP
terraform
Commits
c2ef32cc
Commit
c2ef32cc
authored
4 years ago
by
František Dvořák
Browse files
Options
Downloads
Patches
Plain Diff
Advanced image search
parent
e839bfb3
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+4
-3
4 additions, 3 deletions
.gitlab-ci.yml
deploy.tf
+8
-1
8 additions, 1 deletion
deploy.tf
variables.tf
+18
-3
18 additions, 3 deletions
variables.tf
with
30 additions
and
7 deletions
.gitlab-ci.yml
+
4
−
3
View file @
c2ef32cc
...
...
@@ -7,7 +7,8 @@ stages:
-
deploy
variables
:
IMAGE
:
debian-9-x86_64_hadoop_rc
IMAGE_NAME
:
debian-9-x86_64_hadoop_rc
IMAGE_VISIBILITY
:
community
JOB
:
check
PYTHONUNBUFFERED
:
1
SENSITIVE
:
1
...
...
@@ -34,7 +35,7 @@ terraform-single:
-
"
.terraform/"
-
"
*.tfstate"
script
:
-
./launch.sh -var type=hadoop-single -var flavor=standard.large -var n=0 -var domain=terra1 -var image=$IMAGE
-
./launch.sh -var type=hadoop-single -var flavor=standard.large -var n=0 -var domain=terra1 -var image
_name
=$IMAGE
_NAME -var image_visibility=$IMAGE_VISIBILITY
-
eval $(ssh-agent -s)
-
ssh-add ./ssh-key.terra1.txt
-
ansible -i ./inventory -m synchronize -a 'use_ssh_args=yes verify_host=yes src=image/tests dest=/opt/ mode=push' master
...
...
@@ -56,7 +57,7 @@ terraform-cluster:
-
"
.terraform/"
-
"
*.tfstate"
script
:
-
./launch.sh -var type=hadoop -var domain=terra2 -var image=$IMAGE
-
./launch.sh -var type=hadoop -var domain=terra2 -var image
_name
=$IMAGE
_NAME -var image_visibility=$IMAGE_VISIBILITY
-
eval $(ssh-agent -s)
-
ssh-add ./ssh-key.terra2.txt
-
ansible -i ./inventory -m synchronize -a 'use_ssh_args=yes verify_host=yes src=image/tests dest=/opt/ mode=push' master
...
...
This diff is collapsed.
Click to expand it.
deploy.tf
+
8
−
1
View file @
c2ef32cc
...
...
@@ -18,6 +18,13 @@ data "openstack_compute_keypair_v2" "userkey" {
name
=
var
.
ssh
}
data
"openstack_images_image_v2"
"image"
{
name
=
var
.
image_name
owner
=
var
.
image_owner
visibility
=
var
.
image_visibility
most_recent
=
true
}
data
"template_file"
"user_data_common"
{
count
=
var
.
n
+
1
template
=
file
(
"common/ctx.yaml"
)
...
...
@@ -102,7 +109,7 @@ resource "openstack_compute_instance_v2" "server" {
count
=
var
.
n
+
1
name
=
format
(
"%s.%s"
,
data
.
template_file
.
user_data_common
[
count
.
index
].
vars
.
host
,
var
.
domain
)
flavor_name
=
var
.
flavor
image_
name
=
var
.
image
image_
id
=
var
.
image_id
==
null
?
data
.
openstack_images_image_v2
.
image
.
id
:
var
.
image
_id
key_pair
=
var
.
ssh
security_groups
=
[
openstack_networking_secgroup_v2
.
all
.
name
,
...
...
This diff is collapsed.
Click to expand it.
variables.tf
+
18
−
3
View file @
c2ef32cc
...
...
@@ -28,9 +28,24 @@ variable "flavor" {
default
=
"standard.medium"
}
variable
"image"
{
description
=
"Image name"
default
=
"debian-9-x86_64"
variable
"image_id"
{
description
=
"Image id (override other image search values)"
default
=
null
}
variable
"image_name"
{
description
=
"Image search name"
default
=
"debian-9-x86_64_hadoop"
}
variable
"image_owner"
{
description
=
"Image search owner"
default
=
"85c8a74440e94d4b91d0dc067308cb64"
# meta-hadoop
}
variable
"image_visibility"
{
description
=
"Image search visibility"
default
=
"public"
}
variable
"image_user"
{
...
...
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