Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
be40a88
Barclamp skeleton
Mar 16, 2017
619fd1c
Merge remote-tracking branch 'origin/master' into oscm_barclamp
Mar 21, 2017
33f627d
Fix oscm json and schema
Mar 21, 2017
5eeabe9
Fix oscm view
Mar 21, 2017
fc78d61
Remove white space
Mar 21, 2017
5cbe076
Add missing api protocol from view in json and locales
Mar 23, 2017
2f0cc21
Fix syntax
Mar 23, 2017
e303dcf
Add boolean variables
Mar 23, 2017
2f58fc1
Fix json
Mar 23, 2017
fe66d74
Fix json schema
Mar 23, 2017
ab2c0c7
Add UI attributes for proxy and docker
Mar 23, 2017
7e83130
Correct the indentation
Mar 23, 2017
3547a3f
Add proxy authentication on UI
Mar 27, 2017
6221b60
Change order
Mar 27, 2017
5a8ffd8
Add order
Mar 27, 2017
2560b67
Create oscm tenant
Mar 28, 2017
1b089a0
Create oscm user and assign roles
Mar 28, 2017
0b4fadc
Add flavor
Mar 30, 2017
3c251e9
Fix syntax error
Mar 30, 2017
0496f34
Generate certs
Apr 3, 2017
612589a
UI, add public key for the openstack keypair
Apr 3, 2017
3cd0111
Add nova keypair
Apr 3, 2017
8a0f4ad
Create oscm keypair with imported public key
Apr 4, 2017
bfa51e3
Add keypair on UI
Apr 4, 2017
c4a81af
bash syntax errors
Apr 4, 2017
e8122c4
Create oscm keypair for non-empty public key
Apr 6, 2017
4500644
Add heat template for volumes stack
Apr 6, 2017
f25b698
Add cookbook file for volumes stack heat template
Apr 6, 2017
4966365
Add dir for the heat templates
Apr 6, 2017
98e747b
Syntax error
Apr 6, 2017
acbe92b
Add file to default dir
Apr 6, 2017
e8d36d5
Remove file from file dir
Apr 6, 2017
e1a8227
Add create oscm volume stack
Apr 7, 2017
a23367b
Adapt stack parameters
Apr 7, 2017
aa43c74
Refactor the oscm openstack json
Apr 10, 2017
d5b9bff
Refactor oscm openstack json
Apr 10, 2017
c88e0e4
Add instance stack template
Apr 11, 2017
afcb31b
Correct the source names for cookbook files
Apr 11, 2017
3b573aa
Add instance stack
Apr 11, 2017
e6a6648
Syntax error
Apr 11, 2017
9602315
Coorect syntax
Apr 11, 2017
24eba66
Ignore resource exists errors
Apr 12, 2017
552f995
Correct cookbook file name
Apr 12, 2017
371f402
Modified heat params
Apr 13, 2017
80fd84d
Add proxy and docker params
Apr 13, 2017
a03fe08
Add mail params
Apr 13, 2017
99a95dd
Add mail port in oscm security group
Apr 13, 2017
293b8e3
Inject ssh certs
Apr 27, 2017
df26831
Add missing line
Jun 2, 2017
63d4aa5
Merge remote-tracking branch 'origin/master' into oscm_barclamp
Sep 19, 2017
c6471ef
Correct whitespace
Sep 19, 2017
e70c8d9
Refator - prepare for tommee-based containers
Sep 20, 2017
b341660
Refator - prepare for tommee-based containers
Sep 20, 2017
34c89ca
Merge branch 'oscm_barclamp' of https://github.com/servicecatalog/cro…
Sep 20, 2017
3365d47
Add property for secure mailserver connection
Sep 20, 2017
a9b98b3
Refactor
Sep 22, 2017
1a863bf
Remove unnecessary properties
Sep 22, 2017
4060d29
Split the oscm resources creation
Sep 25, 2017
8f7b25e
check if cert exists
Sep 25, 2017
72c6184
Fix param name in heat template
Sep 25, 2017
207b050
Correct typo
Sep 25, 2017
0f520ef
Add key_name param
Sep 25, 2017
bf8c462
Change setting
Sep 25, 2017
347b452
Remove Heat endpoint
Sep 26, 2017
6df74b7
Add script for writing Heat output
Sep 26, 2017
a193c25
Add oscm deployment script
Sep 26, 2017
6a98b8b
Add dir creation
Sep 26, 2017
d3ca226
Refactor oscm recipe
Sep 27, 2017
64d3950
Add oscm configuration template
Sep 27, 2017
444374b
Add docker organization setting
Sep 28, 2017
72c15d7
Correct json
Sep 28, 2017
5a0c4b7
Add new settings
Oct 2, 2017
0e6d1b5
Host fqdn setting
Oct 2, 2017
dd9d044
Refactor flavor access creation
Oct 2, 2017
6ccc22b
Rename tenant to project
Oct 2, 2017
e2f39bf
Revert project to tenant
Oct 5, 2017
2ef5de4
Add docker compose templates
Oct 6, 2017
4f3fb54
docker compose templates
Oct 6, 2017
0bce4e6
Remove unnecessary variables
Oct 6, 2017
1d5f216
oscm config template variable
Oct 6, 2017
e38ffc0
refactored oscm deploy script: basic host setup working
Oct 6, 2017
c9d89ab
enhanced ssl certificate deployment
Oct 6, 2017
e4c8635
if containers are running, stop them
Oct 6, 2017
2adcc5f
added checks to make re-run and upgrade with deployment script possible
Oct 6, 2017
d016cd8
removed creation of docker compose files from deployment script - wil…
Oct 6, 2017
4161a22
removed superfluous variables from deployment script
Oct 6, 2017
75e4a40
removed unnecessary wait loop from deploy script
Oct 9, 2017
d1a240e
deploy script: copy prepared Docker Compose files
Oct 9, 2017
e24a5d3
added logging configuration to deploy script
Oct 10, 2017
b3fdbd1
SSL certs and update deploy
Oct 10, 2017
c91da76
Merge branch 'oscm_barclamp_refactor' of https://github.com/serviceca…
Oct 10, 2017
7a2c8bc
Rename volumes
Oct 10, 2017
d9df8ac
Add missing settings
Oct 11, 2017
7ba045c
fixed error in deploy script
Oct 11, 2017
e6707be
remove ssl certificate generation from deploy script
Oct 11, 2017
7084889
correct parameter name
Oct 11, 2017
9574c63
Change path for deployment script
Oct 12, 2017
b998a55
Correct container name
Oct 12, 2017
313a671
Add var.env
Oct 12, 2017
d374362
add copying of var.env to deploy script
Oct 12, 2017
86876bd
remove debug output from deploy script
Oct 12, 2017
3de883d
fix typo in deploy script
Oct 12, 2017
96f5746
Set temp postgres pwd
Oct 12, 2017
ea11a8b
Merge branch 'oscm_barclamp_refactor' of https://github.com/serviceca…
Oct 12, 2017
73f9ba1
Remove temp pwd
Oct 12, 2017
9be6da4
change ports of oscm CORE to standard
Oct 12, 2017
8fc6a46
Merge pull request #8 from servicecatalog/change_core_ports
StavrevaS Oct 12, 2017
8a5386a
add handling of cinder volumes to deploy script
Oct 12, 2017
4037333
Barclamp should not wait for deployment script.
StavrevaS Oct 13, 2017
df6bbdb
move cinder volume preparation to heat-config and add fstab
Oct 13, 2017
b0b6a07
Add env file
StavrevaS Oct 13, 2017
0cc4b27
Merge branch 'oscm_barclamp_refactor' of https://github.com/serviceca…
StavrevaS Oct 13, 2017
3dcece0
Rename oscm to escm
StavrevaS Oct 13, 2017
a253475
create config directory in heat-config
Oct 13, 2017
419f5df
Rename template
StavrevaS Oct 13, 2017
ab58e94
Rename template
StavrevaS Oct 13, 2017
d8ebc59
no_proxy setting
StavrevaS Oct 13, 2017
59d8e10
Rename oscm to escm
StavrevaS Oct 16, 2017
4dd1c1a
Rename oscm to escm
StavrevaS Oct 16, 2017
0e0c1e4
Check the glance image for existence
StavrevaS Oct 16, 2017
64a35a2
Rename
StavrevaS Oct 16, 2017
fe68186
Rename
StavrevaS Oct 16, 2017
5c0ce7c
rename
StavrevaS Oct 16, 2017
1ea5490
rename
StavrevaS Oct 16, 2017
d82f069
Rename
StavrevaS Oct 16, 2017
d2d4b90
Rename
StavrevaS Oct 16, 2017
1f37ee9
add debug log for heat-config
Oct 16, 2017
8f9fe77
Merge branch 'oscm_barclamp_refactor' of https://github.com/serviceca…
Oct 16, 2017
8eedc5b
change format of heat variables in heat-config
Oct 16, 2017
752e649
change directory structure
Oct 16, 2017
641ffd2
Merge pull request #11 from servicecatalog/new_directory_structure
StavrevaS Oct 17, 2017
de77359
fix typo in heat-config
Oct 17, 2017
91168af
Fix error
StavrevaS Oct 17, 2017
14e67ef
Merge branch 'oscm_barclamp_refactor' of https://github.com/serviceca…
StavrevaS Oct 17, 2017
0c204a3
Change the birt container ports
StavrevaS Oct 18, 2017
20edef8
re-introduce success message in heat-config
Oct 18, 2017
7e6a0b8
brandings: fix directory structure
Oct 18, 2017
0269633
Add synchronization
StavrevaS Oct 18, 2017
d1c056c
fix variable name in heat-config
Oct 18, 2017
a1f300d
Merge branch 'oscm_barclamp_refactor' of https://github.com/serviceca…
Oct 18, 2017
3ace362
Correct paramter
StavrevaS Oct 18, 2017
1634a1e
add missing variable in docker compose environment file
Oct 19, 2017
4c344d5
Remove repeat
StavrevaS Oct 19, 2017
79e5676
One variables file
StavrevaS Oct 19, 2017
80a7e2a
change locations of ssl files
Oct 19, 2017
50fd720
Check if update necessary
StavrevaS Oct 20, 2017
a41b5ff
Rename cert files
StavrevaS Oct 20, 2017
bb8a5d0
Include docker tag in variables template
StavrevaS Oct 20, 2017
bf6c319
Adapt container ssl paths
StavrevaS Oct 20, 2017
4c9adb5
Fixes #17 make logging persistent and append
Oct 20, 2017
b012e4c
refactor deploy script to use deployer container
Oct 23, 2017
4548f80
changed template files to work with deployer
Oct 25, 2017
f7a1c32
change ssl cert generation to ruby block
Oct 25, 2017
a10b834
Revert "change ssl cert generation to ruby block"
Oct 25, 2017
915faeb
ssl generation with lazy evaluation
Oct 25, 2017
0f16ef7
fix variables for .env template
Oct 25, 2017
249a1ce
fix syntax
Oct 30, 2017
69c28dc
fix nil variable
Nov 7, 2017
bcf7e7a
improve setting no_proxy
Nov 7, 2017
470016e
fix setting no_proxy
Nov 9, 2017
9b8ffca
use variables for mutable attributes
Nov 9, 2017
70f5743
change to new var.env file structure
Nov 9, 2017
cfee582
change setup log location to cinder volume
Nov 9, 2017
48304df
change default version tag attribute format
Nov 9, 2017
50702d3
fix missing copy of .env file
Nov 10, 2017
e12a621
fix pwd for docker-compose
Nov 10, 2017
20d8d49
add check for mandatory variables
Nov 13, 2017
113ab78
fix db super password
Nov 13, 2017
5c8905f
fix db super password
Nov 13, 2017
ee3e37b
bump number of cpu for instance to 4
Nov 13, 2017
db5feb4
enable syslog
Nov 13, 2017
bfe54cf
fix and update docker image locations
Nov 13, 2017
7975a25
fix bug in ssl keypair deployment
Nov 13, 2017
4cddb18
fix stopping containers on update
Nov 13, 2017
5f36ca0
updated ports in security policy
Nov 13, 2017
0b5d06c
remove protocol choice from ui, always ssl
Nov 13, 2017
306cc32
Revert "remove protocol choice from ui, always ssl"
Nov 13, 2017
0376d52
Merge pull request #26 from servicecatalog/oscm_barclamp_refactor_dep…
Nov 13, 2017
4b614c2
disable container logging to messages
Nov 13, 2017
f793de1
Merge pull request #27 from servicecatalog/issue_24
Nov 13, 2017
0c5e140
removed superfluous comments and files
Nov 13, 2017
1789e52
Merge pull request #28 from servicecatalog/issue_22
Nov 13, 2017
dd7ac84
removed unused insecure flag
Nov 13, 2017
9efb6d5
reduce protocol choice to https
Nov 14, 2017
c72cdb8
Merge pull request #30 from servicecatalog/issue_23
Nov 14, 2017
3a6e309
remove superfluous templates
Nov 14, 2017
e2bef30
add swap file for Docker instance
Nov 14, 2017
565271c
fix error with swap creation
Nov 14, 2017
67c569d
fix another error in swap creation
Nov 14, 2017
662d80f
increase size of cinder volumes
Nov 14, 2017
57d877b
fix size increase for cinder volumes
Nov 14, 2017
0bc853f
create swap
Nov 14, 2017
aaf05a6
fix permissions on swap file
Nov 14, 2017
0fa5228
Merge pull request #32 from servicecatalog/issue_29
Nov 14, 2017
ec35c08
rename old config file for clarity
Nov 14, 2017
1e3b8ed
add check to update on certificate change
Nov 14, 2017
c3e1b3b
additional check for certificate changed check
Nov 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions bin/crowbar_escm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env ruby
#
# Copyright 2017, SUSE LINUX GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require File.join(File.expand_path(File.dirname(__FILE__)), "barclamp_lib")
@barclamp = "escm"
@timeout = 3600

main

1 change: 1 addition & 0 deletions chef/cookbooks/escm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Chef Cookbook to install and configure ESCM
22 changes: 22 additions & 0 deletions chef/cookbooks/escm/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Copyright 2017, SUSE LINUX GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

default[:escm][:proxy][:no_proxy_default] = "localhost,127.0.0.1"

default[:escm][:ssl][:certfile] = "/etc/escm/ssl/certs/signing_cert.pem"
default[:escm][:ssl][:keyfile] = "/etc/escm/ssl/private/signing_key.pem"
default[:escm][:ssl][:generate_certs] = false
default[:escm][:ssl][:ca_certs] = "/etc/escm/ssl/certs/ca.pem"
261 changes: 261 additions & 0 deletions chef/cookbooks/escm/files/default/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
# heat stack-create --poll -f application.yaml -P logs_volume_id=$logs_volume_id -P data_volume_id=$data_volume_id -P key_name=default -P flavor=d1.tiny escm
heat_template_version: 2015-10-15

description: |
# This is how you deploy the whole thing:
# 1) Instantiate volumes.yaml as follows
heat stack-create --poll -f volumes.yaml escm

# 2) Retrieve outputs from escm:
logs_volume_id=$(heat output-show escm logs_volume_id | sed 's/"//g')
data_volume_id=$(heat output-show escm data_volume_id | sed 's/"//g')

# 3) Create application stack:
heat stack-create --poll -f application.yaml -P logs_volume_id=$logs_volume_id -P data_volume_id=$data_volume_id -P key_name=<your nova keypair's name> escm



parameters:
floating_network:
type: string
default: floating
description: Network to draw Floating IPs from
image:
type: string
default: sles12-sp1
description: Glance image to use for server
flavor:
type: string
default: escm.medium
description: Nova flavor to use for server
key_name:
type: string
default: escm
description: Keypair name
logs_volume_id:
type: string
description: The Cinder volume for logs
data_volume_id:
type: string
description: The Cinder volume for data
ssh_cert:
default: ""
type: string
description: SSH key to add to servers' /root/.ssh/authorized_keys
wait_condition_timeout:
default: 1800
type: number

resources:

wait_handle:
type: OS::Heat::WaitConditionHandle

wait_condition:
type: OS::Heat::WaitCondition
depends_on: appserver
properties:
handle: { get_resource: wait_handle }
timeout: { get_param: wait_condition_timeout }

db_password:
type: OS::Heat::RandomString

key_secret:
type: OS::Heat::RandomString

db_core_password:
type: OS::Heat::RandomString

db_app_password:
type: OS::Heat::RandomString

### Network infrastructure ###

escm_network:
type: OS::Neutron::Net
properties:
name: escm

escm_subnet:
type: OS::Neutron::Subnet
properties:
cidr: 10.0.0.1/24
name: escm
network:
get_resource: escm_network

router:
type: OS::Neutron::Router
properties:
external_gateway_info:
network:
get_param: floating_network


router_interface:
type: OS::Neutron::RouterInterface
properties:
router: { get_resource: router }
subnet: { get_resource: escm_subnet }

allow_inbound:
type: OS::Neutron::SecurityGroup
properties:
description: "Allow inbound SSH and HTTP traffic"
name: escm
rules:
- direction: ingress
remote_ip_prefix: 0.0.0.0/0
protocol: tcp
ethertype: IPv4
port_range_min: 22
port_range_max: 22
- direction: ingress
remote_ip_prefix: 0.0.0.0/0
protocol: tcp
ethertype: IPv4
port_range_min: 8081
port_range_max: 8081
- direction: ingress
remote_ip_prefix: 0.0.0.0/0
protocol: tcp
ethertype: IPv4
port_range_min: 8443
port_range_max: 8443
- direction: ingress
remote_ip_prefix: 0.0.0.0/0
protocol: tcp
ethertype: IPv4
port_range_min: 8543
port_range_max: 8543
- direction: ingress
remote_ip_prefix: 0.0.0.0/0
protocol: tcp
ethertype: IPv4
port_range_min: 8681
port_range_max: 8681
- direction: ingress
remote_ip_prefix: 0.0.0.0/0
protocol: tcp
ethertype: IPv4
port_range_min: 8881
port_range_max: 8881
- direction: egress
protocol: tcp
ethertype: IPv4
- direction: egress
protocol: tcp
ethertype: IPv6
- direction: egress
protocol: udp
ethertype: IPv4
- direction: egress
protocol: udp
ethertype: IPv6
- direction: egress
protocol: icmp
ethertype: IPv4
- direction: egress
protocol: icmp
ethertype: IPv6

# Parameters that will be available to both user data scripts
user_data_params:
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config:
str_replace:
template: {get_file: user-data/heat-config}
params:
$LOGS_VOLUME_DEV:
list_join:
- ""
- - "/dev/disk/by-id/virtio-"
- { get_param: logs_volume_id }
$DATA_VOLUME_DEV:
list_join:
- ""
- - "/dev/disk/by-id/virtio-"
- { get_param: data_volume_id }
$SSH_CERT: { get_param: ssh_cert }
$WAIT_CURL: { get_attr: [ wait_handle, curl_cli ] }

# User data payload for appserver
userdata_appserver:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: user_data_params}

### Servers ###

appserver:
type: OS::Nova::Server
properties:
name: appserver
config_drive: true
flavor: { get_param: flavor }
image: { get_param: image }
key_name: { get_param: key_name }
networks:
- port: { get_resource: port_appserver }
user_data_format: RAW
user_data: { get_resource: userdata_appserver }

port_appserver:
type: OS::Neutron::Port
properties:
network:
get_resource: escm_network
security_groups:
- get_resource: allow_inbound

ip_appserver:
type: OS::Neutron::FloatingIP
properties:
port_id: { get_resource: port_appserver }
floating_network:
get_param: floating_network

logs_volume_attachment:
type: OS::Cinder::VolumeAttachment
properties:
instance_uuid: { get_resource: appserver }
volume_id: { get_param: logs_volume_id }

data_volume_attachment:
type: OS::Cinder::VolumeAttachment
properties:
instance_uuid: { get_resource: appserver }
volume_id: { get_param: data_volume_id }

outputs:
# Retrieval after stack creation (presuming stack is named `mystack`):
# heat output-show mystack ip_appserver
ip_appserver:
value:
get_attr:
- ip_appserver
- floating_ip_address
db_password:
value:
get_attr:
- db_password
- value
db_core_password:
value:
get_attr:
- db_core_password
- value
db_app_password:
value:
get_attr:
- db_app_password
- value
key_secret:
value:
get_attr:
- key_secret
- value
Loading