Retire Murano: remove repo content
Murano project is retiring - https://review.opendev.org/c/openstack/governance/+/919358 this commit remove the content of this project repo Depends-On: https://review.opendev.org/c/openstack/project-config/+/919359/ Change-Id: I35cb152906ed74fef488ec342ceb46aed6aff2e3
27
.zuul.yaml
@ -1,27 +0,0 @@
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- murano-apps-refstackclient-unittest
|
||||
- openstack-tox-linters:
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- noop
|
||||
|
||||
- job:
|
||||
name: murano-apps-refstackclient-unittest
|
||||
parent: devstack-tox-functional
|
||||
timeout: 7800
|
||||
required-projects:
|
||||
- opendev.org/openstack/murano
|
||||
- opendev.org/openstack/murano-apps
|
||||
- opendev.org/openstack/python-muranoclient
|
||||
- opendev.org/openinfra/refstack
|
||||
voting: false
|
||||
vars:
|
||||
devstack_plugins:
|
||||
murano: https://opendev.org/openstack/murano
|
||||
openrc_enable_export: true
|
||||
tox_envlist: refstackclient-unittest
|
||||
files:
|
||||
- RefStackClient/.*
|
@ -1,74 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.apache
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
conf: io.murano.configuration
|
||||
|
||||
|
||||
Name: ApacheHttpServer
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
|
||||
enablePHP:
|
||||
Contract: $.bool()
|
||||
Default: false
|
||||
|
||||
instance:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $._environment.reporter.report($this, 'Creating VM for Apache Server.')
|
||||
- $securityGroupIngress:
|
||||
- ToPort: 80
|
||||
FromPort: 80
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: 443
|
||||
FromPort: 443
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- $._environment.securityGroupManager.addGroupIngress($securityGroupIngress)
|
||||
- $.instance.deploy()
|
||||
|
||||
- $._environment.reporter.report($this, 'Instance is created. Deploying Apache.')
|
||||
|
||||
- $file: sys:Resources.string('deployApache.sh')
|
||||
- conf:Linux.runCommand($.instance.agent, $file)
|
||||
|
||||
- If: $.enablePHP
|
||||
Then:
|
||||
- $._environment.reporter.report($this, 'Installing PHP.')
|
||||
- conf:Linux.runCommand($.instance.agent, "sudo apt-get -y install php5")
|
||||
|
||||
- $._environment.reporter.report($this, 'Apache is installed.')
|
||||
- If: $.instance.assignFloatingIp
|
||||
Then:
|
||||
- $host: $.instance.floatingIpAddress
|
||||
Else:
|
||||
- $host: $.instance.ipAddresses.first()
|
||||
|
||||
- $._environment.reporter.report($this, format('Apache is available at http://{0}', $host))
|
||||
- $.setAttr(deployed, true)
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install apache2
|
||||
|
||||
for i in 443 80
|
||||
do
|
||||
sudo iptables -I INPUT 1 -p tcp -m tcp --dport $i -j ACCEPT -m comment --comment "by murano, Apache server access on HTTPS port $i"
|
||||
done
|
@ -1,114 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2.2
|
||||
|
||||
Templates:
|
||||
customJoinNet:
|
||||
- ?:
|
||||
type: io.murano.resources.ExistingNeutronNetwork
|
||||
internalNetworkName: $.instanceConfiguration.network[0]
|
||||
internalSubnetworkName: $.instanceConfiguration.network[1]
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.example.apache.ApacheHttpServer
|
||||
enablePHP: $.appConfiguration.enablePHP
|
||||
instance:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: generateHostname($.instanceConfiguration.unitNamingPattern, 1)
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
availabilityZone: $.instanceConfiguration.availabilityZone
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
networks:
|
||||
useEnvironmentNetwork: $.instanceConfiguration.network[0]=null
|
||||
useFlatNetwork: false
|
||||
customNetworks: switch($.instanceConfiguration.network[0], $=null=>list(), $!=null=>$customJoinNet)
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: license
|
||||
type: string
|
||||
description: Apache License, Version 2.0
|
||||
hidden: true
|
||||
required: false
|
||||
- name: enablePHP
|
||||
label: Enable PHP
|
||||
type: boolean
|
||||
description: >-
|
||||
Add php support to the Apache WebServer
|
||||
initial: false
|
||||
required: false
|
||||
- name: assignFloatingIP
|
||||
type: boolean
|
||||
label: Assign Floating IP
|
||||
description: >-
|
||||
Select to true to assign floating IP automatically
|
||||
initial: false
|
||||
required: false
|
||||
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that application performance
|
||||
depends on this parameter.
|
||||
required: false
|
||||
- name: osImage
|
||||
type: image
|
||||
imageType: linux
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select valid image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: keypair
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Select the Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment of application.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where application would be installed.
|
||||
required: false
|
||||
- name: network
|
||||
type: network
|
||||
label: Network
|
||||
description: Select a network to join. 'Auto' corresponds to a default environment's network.
|
||||
required: false
|
||||
murano_networks: translate
|
||||
- name: unitNamingPattern
|
||||
type: string
|
||||
label: Instance Naming Pattern
|
||||
required: false
|
||||
maxLength: 64
|
||||
regexpValidator: '^[a-zA-z][-_\w]*$'
|
||||
errorMessages:
|
||||
invalid: Just letters, numbers, underscores and hyphens are allowed.
|
||||
helpText: Just letters, numbers, underscores and hyphens are allowed.
|
||||
description: >-
|
||||
Specify a string, that will be used in instance hostname.
|
||||
Just A-Z, a-z, 0-9, dash and underline are allowed.
|
||||
|
Before Width: | Height: | Size: 33 KiB |
@ -1,28 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.example.apache.ApacheHttpServer
|
||||
Name: Apache HTTP Server
|
||||
Description: |
|
||||
The Apache HTTP Server Project is an effort to develop and maintain an
|
||||
open-source HTTP server for modern operating systems including UNIX and
|
||||
Windows NT. The goal of this project is to provide a secure, efficient and
|
||||
extensible server that provides HTTP services in sync with the current HTTP
|
||||
standards.
|
||||
Apache httpd has been the most popular web server on the Internet since
|
||||
April 1996, and celebrated its 17th birthday as a project this February.
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: [HTTP, Server, WebServer, HTML, Apache]
|
||||
Classes:
|
||||
com.example.apache.ApacheHttpServer: ApacheHttpServer.yaml
|
@ -1,77 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.apache
|
||||
apps: io.murano.applications
|
||||
conf: io.murano.configuration
|
||||
res: io.murano.resources
|
||||
std: io.murano
|
||||
sys: io.murano.system
|
||||
|
||||
|
||||
Name: ApacheHttpServer
|
||||
|
||||
Extends:
|
||||
- apps:MultiServerApplicationWithScaling
|
||||
- apps:OpenStackSecurityConfigurable
|
||||
|
||||
Properties:
|
||||
enablePHP:
|
||||
Contract: $.bool()
|
||||
Default: false
|
||||
|
||||
Methods:
|
||||
getSecurityRules:
|
||||
Body:
|
||||
- Return:
|
||||
- ToPort: 80
|
||||
FromPort: 80
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: 443
|
||||
FromPort: 443
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
|
||||
onInstallServer:
|
||||
Arguments:
|
||||
- server:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
- serverGroup:
|
||||
Contract: $.class(apps:ServerGroup).notNull()
|
||||
Body:
|
||||
- $file: sys:Resources.string('deployApache.sh')
|
||||
- conf:Linux.runCommand($server.agent, $file)
|
||||
- If: $this.enablePHP
|
||||
Then:
|
||||
- conf:Linux.runCommand($server.agent, "sudo apt-get -y install php5")
|
||||
|
||||
onCompleteConfiguration:
|
||||
Arguments:
|
||||
- servers:
|
||||
Contract:
|
||||
- $.class(res:Instance).notNull()
|
||||
- serverGroup:
|
||||
Contract: $.class(apps:ServerGroup).notNull()
|
||||
- failedServers:
|
||||
Contract:
|
||||
- $.class(res:Instance).notNull()
|
||||
Body:
|
||||
- $ips: $serverGroup.getServers().selectMany(
|
||||
switch(
|
||||
$.assignFloatingIp => [$.floatingIpAddress],
|
||||
true => $.ipAddresses
|
||||
)).select(format('http://{0}', $)).join(', ')
|
||||
|
||||
- $this.find(std:Environment).require().reporter.report($this, format('Apache is available at {0}', $ips))
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install apache2
|
||||
|
||||
for i in 443 80
|
||||
do
|
||||
sudo iptables -I INPUT 1 -p tcp -m tcp --dport $i -j ACCEPT -m comment --comment "by murano, Apache server access on HTTPS port $i"
|
||||
done
|
@ -1,124 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2.2
|
||||
|
||||
Templates:
|
||||
customJoinNet:
|
||||
- ?:
|
||||
type: io.murano.resources.ExistingNeutronNetwork
|
||||
internalNetworkName: $.instanceConfiguration.network[0]
|
||||
internalSubnetworkName: $.instanceConfiguration.network[1]
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.example.apache.ApacheHttpServer
|
||||
classVersion: 1.0.0
|
||||
enablePHP: $.appConfiguration.enablePHP
|
||||
servers:
|
||||
?:
|
||||
type: io.murano.applications.ServerReplicationGroup
|
||||
numItems: $.appConfiguration.numNodes
|
||||
provider:
|
||||
?:
|
||||
type: io.murano.applications.TemplateServerProvider
|
||||
template:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
availabilityZone: $.instanceConfiguration.availabilityZone
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
networks:
|
||||
useEnvironmentNetwork: $.instanceConfiguration.network[0]=null
|
||||
useFlatNetwork: false
|
||||
customNetworks: switch($.instanceConfiguration.network[0], $=null=>list(), $!=null=>$customJoinNet)
|
||||
serverNamePattern: $.instanceConfiguration.unitNamingPattern
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: license
|
||||
type: string
|
||||
description: Apache License, Version 2.0
|
||||
hidden: true
|
||||
required: false
|
||||
- name: enablePHP
|
||||
label: Enable PHP
|
||||
type: boolean
|
||||
description: >-
|
||||
Add php support to the Apache WebServer
|
||||
initial: false
|
||||
required: false
|
||||
- name: assignFloatingIP
|
||||
type: boolean
|
||||
label: Assign Floating IP
|
||||
description: >-
|
||||
Select to true to assign floating IP automatically
|
||||
initial: false
|
||||
required: false
|
||||
- name: numNodes
|
||||
type: integer
|
||||
label: Initial number of Nodes
|
||||
initial: 1
|
||||
minValue: 1
|
||||
required: true
|
||||
description: >-
|
||||
Select the initial number of Apache Nodes
|
||||
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that application performance
|
||||
depends on this parameter.
|
||||
required: false
|
||||
- name: osImage
|
||||
type: image
|
||||
imageType: linux
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select valid image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: keypair
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Select the Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment of application.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where application would be installed.
|
||||
required: false
|
||||
- name: network
|
||||
type: network
|
||||
label: Network
|
||||
description: Select a network to join. 'Auto' corresponds to a default environment's network.
|
||||
required: false
|
||||
murano_networks: translate
|
||||
- name: unitNamingPattern
|
||||
type: string
|
||||
label: Instance naming pattern
|
||||
required: false
|
||||
maxLength: 64
|
||||
initial: 'node-{0}'
|
||||
|
Before Width: | Height: | Size: 33 KiB |
@ -1,32 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.example.apache.ApacheHttpServer
|
||||
Version: 1.0.0
|
||||
Name: Apache HTTP Server
|
||||
Description: |
|
||||
The Apache HTTP Server Project is an effort to develop and maintain an
|
||||
open-source HTTP server for modern operating systems including UNIX and
|
||||
Windows NT. The goal of this project is to provide a secure, efficient and
|
||||
extensible server that provides HTTP services in sync with the current HTTP
|
||||
standards.
|
||||
Apache httpd has been the most popular web server on the Internet since
|
||||
April 1996, and celebrated its 17th birthday as a project this February.
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: [HTTP, Server, WebServer, HTML, Apache]
|
||||
Classes:
|
||||
com.example.apache.ApacheHttpServer: ApacheHttpServer.yaml
|
||||
|
||||
Require:
|
||||
io.murano.applications:
|
@ -1,83 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.network.dns
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
conf: io.murano.configuration
|
||||
|
||||
Name: Bind
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
instance:
|
||||
Contract: $.class(res:LinuxMuranoInstance)
|
||||
|
||||
zoneName:
|
||||
Contract: $.string().notNull()
|
||||
|
||||
dnsSecKey:
|
||||
Contract: $.string().notNull()
|
||||
Usage: InOut
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $.environment: $.find(std:Environment).require()
|
||||
|
||||
_createReplacements:
|
||||
Body:
|
||||
- Return:
|
||||
"%PUBLIC_IP%": $.instance.floatingIpAddress
|
||||
"%PRIVATE_IP%": $.instance.joinedNetworks.first().ipList.where($ != $this.instance.floatingIpAddress).first()
|
||||
"%ZONE%": $.zoneName
|
||||
"%DNSSEC_KEY%": $.dnsSecKey
|
||||
"%PRIVATE_NETWORK_CIDR%": $.instance.joinedNetworks.first().network.describe().cidr
|
||||
|
||||
_addSecurityGroupRules:
|
||||
Body:
|
||||
- $rules:
|
||||
# DNS
|
||||
- FromPort: 53
|
||||
ToPort: 53
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- FromPort: 53
|
||||
ToPort: 53
|
||||
IpProtocol: udp
|
||||
External: true
|
||||
- $.environment.securityGroupManager.addGroupIngress($rules)
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $._report('DNS server deploy started')
|
||||
- $._addSecurityGroupRules()
|
||||
- $.instance.deploy()
|
||||
- $._report('Run install script')
|
||||
- $replacements: $._createReplacements()
|
||||
- $file: sys:Resources.string('deployBind.sh').replace($replacements)
|
||||
- conf:Linux.runCommand($.instance.agent, $file)
|
||||
- $._report('BIND configured')
|
||||
- $.setAttr(deployed, true)
|
||||
|
||||
_report:
|
||||
Arguments:
|
||||
- message:
|
||||
Contract: $.string().notNull()
|
||||
Body:
|
||||
- $.environment.reporter.report($this, $message)
|
||||
|
@ -1,17 +0,0 @@
|
||||
====
|
||||
BIND
|
||||
====
|
||||
|
||||
BIND is open source software that implements the Domain Name System (DNS)
|
||||
protocols for the Internet.
|
||||
It is a reference implementation of those protocols,
|
||||
but it is also production-grade software, suitable for use in high-volume
|
||||
and high-reliability applications.
|
||||
The name BIND stands for “Berkeley Internet Name Domain”,
|
||||
because the software originated in the early 1980s
|
||||
at the University of California at Berkeley.
|
||||
|
||||
BIND is by far the most widely used DNS software on the Internet,
|
||||
providing a robust and stable platform on top of which organizations
|
||||
can build distributed computing systems with the knowledge that those
|
||||
systems are fully compliant with published DNS standards.
|
@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
deploy () {
|
||||
set -x
|
||||
|
||||
# Install BIND.
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install bind9 --yes
|
||||
|
||||
# Update BIND configuration with the specified zone and key.
|
||||
cat >> /etc/bind/named.conf.local << EOF
|
||||
key %ZONE%. {
|
||||
algorithm "HMAC-MD5";
|
||||
secret "%DNSSEC_KEY%";
|
||||
};
|
||||
|
||||
zone "%ZONE%" IN {
|
||||
type master;
|
||||
file "/var/lib/bind/db.%ZONE%";
|
||||
allow-update {
|
||||
key %ZONE%.;
|
||||
};
|
||||
};
|
||||
EOF
|
||||
|
||||
# Function to give DNS record type and IP address for specified IP address
|
||||
ip2rr() {
|
||||
if echo "${1}" | grep -q -e '[^0-9.]' ; then
|
||||
echo AAAA "${1}"
|
||||
else
|
||||
echo A "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Create basic zone configuration.
|
||||
cat > /var/lib/bind/db.%ZONE% << EOF
|
||||
\$ORIGIN %ZONE%.
|
||||
\$TTL 1h
|
||||
@ IN SOA ns admin\@%ZONE%. ( $(date +%Y%m%d%H) 1d 2h 1w 30s )
|
||||
@ NS ns
|
||||
ns $(ip2rr %PUBLIC_IP%)
|
||||
EOF
|
||||
chown root:bind /var/lib/bind/db.%ZONE%
|
||||
|
||||
# Now that BIND configuration is correct, kick it to reload.
|
||||
service bind9 reload
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
deploy 2>&1 | tee -a /var/log/bind-install.log
|
@ -1,115 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2.2
|
||||
|
||||
Templates:
|
||||
customJoinNet:
|
||||
- ?:
|
||||
type: io.murano.resources.ExistingNeutronNetwork
|
||||
internalNetworkName: $.instanceConfiguration.network[0]
|
||||
internalSubnetworkName: $.instanceConfiguration.network[1]
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.mirantis.network.dns.Bind
|
||||
instance:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: generateHostname($.instanceConfiguration.unitNamingPattern, 1)
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
availabilityZone: $.instanceConfiguration.availabilityZone
|
||||
assignFloatingIp: true
|
||||
networks:
|
||||
useEnvironmentNetwork: $.instanceConfiguration.network[0]=null
|
||||
useFlatNetwork: false
|
||||
customNetworks: switch($.instanceConfiguration.network[0], $=null=>list(), $!=null=>$customJoinNet)
|
||||
zoneName: $.appConfiguration.zoneName
|
||||
dnsSecKey: $.appConfiguration.dnsSecKey
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: license
|
||||
type: string
|
||||
description: Apache License, Version 2.0
|
||||
hidden: true
|
||||
required: false
|
||||
- name: zoneName
|
||||
type: string
|
||||
initial: example.com
|
||||
label: DNS zone name
|
||||
description: >-
|
||||
Enter zone name for BIND installation
|
||||
- name: dnsSecKey
|
||||
type: string
|
||||
label: DNSSEC Key (Base64-encoded)
|
||||
initial: >-
|
||||
SE51akpHSStFTGhsSVZhNmEraDFMMC8yWFFUYlU5UmFIKy9GN3BPUW1EZktXVEdjNThoMHJITmpuSVF0bXM1U0JRc0M2bG5pMUtjd3E4cyszVzRUbUEK
|
||||
description: >-
|
||||
Enter DNSSEC private key (Base64-encoded). This key will be used for update DNS records via DNSSEC.
|
||||
|
||||
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that application performance
|
||||
depends on this parameter.
|
||||
required: false
|
||||
- name: osImage
|
||||
type: image
|
||||
imageType: linux
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select valid Ubuntu 14.04 image with cloud-init for the application.
|
||||
Image should already be prepared and registered in glance.
|
||||
- name: keyPair
|
||||
type: keypair
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Select the Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment of application.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where application would be installed.
|
||||
required: false
|
||||
- name: network
|
||||
type: network
|
||||
label: Network
|
||||
description: Select a network to join. 'Auto' corresponds to a default environment's network.
|
||||
required: false
|
||||
murano_networks: translate
|
||||
- name: unitNamingPattern
|
||||
type: string
|
||||
label: Instance Naming Pattern
|
||||
required: false
|
||||
initial: BIND#
|
||||
maxLength: 64
|
||||
regexpValidator: '^[a-zA-z][_\w#-]*$'
|
||||
errorMessages:
|
||||
invalid: Just letters, numbers, underscores and hyphens are allowed.
|
||||
helpText: Just letters, numbers, underscores and hyphens are allowed.
|
||||
description: >-
|
||||
Specify a string, that will be used in instance hostname.
|
||||
Just A-Z, a-z, 0-9, dash and underline are allowed.
|
Before Width: | Height: | Size: 13 KiB |
@ -1,22 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.mirantis.network.dns.Bind
|
||||
Name: BIND DNS server
|
||||
Description: |
|
||||
BIND is open source software that implements the Domain Name System (DNS) protocols for the Internet.
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: [BIND, DNS]
|
||||
Classes:
|
||||
com.mirantis.network.dns.Bind: Bind.yaml
|
@ -1,77 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.apache
|
||||
apps: io.murano.applications
|
||||
conf: io.murano.configuration
|
||||
res: io.murano.resources
|
||||
std: io.murano
|
||||
sys: io.murano.system
|
||||
|
||||
|
||||
Name: BurstingApacheHttpServer
|
||||
|
||||
Extends:
|
||||
- apps:MultiServerApplicationWithScaling
|
||||
- apps:OpenStackSecurityConfigurable
|
||||
|
||||
Properties:
|
||||
enablePHP:
|
||||
Contract: $.bool()
|
||||
Default: false
|
||||
|
||||
Methods:
|
||||
getSecurityRules:
|
||||
Body:
|
||||
- Return:
|
||||
- ToPort: 80
|
||||
FromPort: 80
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: 443
|
||||
FromPort: 443
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
|
||||
onInstallServer:
|
||||
Arguments:
|
||||
- server:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
- serverGroup:
|
||||
Contract: $.class(apps:ServerGroup).notNull()
|
||||
Body:
|
||||
- $file: sys:Resources.string('deployApache.sh')
|
||||
- conf:Linux.runCommand($server.agent, $file)
|
||||
- If: $this.enablePHP
|
||||
Then:
|
||||
- conf:Linux.runCommand($server.agent, "sudo apt-get -y install php5")
|
||||
|
||||
onCompleteConfiguration:
|
||||
Arguments:
|
||||
- servers:
|
||||
Contract:
|
||||
- $.class(res:Instance).notNull()
|
||||
- serverGroup:
|
||||
Contract: $.class(apps:ServerGroup).notNull()
|
||||
- failedServers:
|
||||
Contract:
|
||||
- $.class(res:Instance).notNull()
|
||||
Body:
|
||||
- $ips: $serverGroup.getServers().selectMany(
|
||||
switch(
|
||||
$.assignFloatingIp => [$.floatingIpAddress],
|
||||
true => $.ipAddresses
|
||||
)).select(format('http://{0}', $)).join(', ')
|
||||
|
||||
- $this.find(std:Environment).require().reporter.report($this, format('Apache is available at {0}', $ips))
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install apache2
|
||||
|
||||
for i in 443 80
|
||||
do
|
||||
sudo iptables -I INPUT 1 -p tcp -m tcp --dport $i -j ACCEPT -m comment --comment "by murano, Apache server access on HTTPS port $i"
|
||||
done
|
@ -1,181 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2.2
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.example.apache.BurstingApacheHttpServer
|
||||
enablePHP: $.appConfiguration.enablePHP
|
||||
servers:
|
||||
?:
|
||||
type: io.murano.applications.ServerReplicationGroup
|
||||
numItems: $.appConfiguration.numNodes
|
||||
provider:
|
||||
?:
|
||||
type: io.murano.applications.CompositeReplicaProvider
|
||||
providers:
|
||||
- ?:
|
||||
type: io.murano.applications.TemplateServerProvider
|
||||
template:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
regionName: $.appConfiguration.region1
|
||||
flavor: $.instanceConfiguration1.flavor
|
||||
image: $.instanceConfiguration1.osImage
|
||||
keyname: $.instanceConfiguration1.keyPair
|
||||
availabilityZone: $.instanceConfiguration1.availabilityZone
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
serverNamePattern: $.appConfiguration.serverNamesPattern
|
||||
capacity: $.appConfiguration.threshhold - 1
|
||||
|
||||
- ?:
|
||||
type: io.murano.applications.TemplateServerProvider
|
||||
template:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
regionName: $.appConfiguration.region2
|
||||
name: anything
|
||||
flavor: $.instanceConfiguration2.flavor
|
||||
image: $.instanceConfiguration2.osImage
|
||||
keyname: $.instanceConfiguration2.keyPair
|
||||
availabilityZone: $.instanceConfiguration2.availabilityZone
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
serverNamePattern: $.appConfiguration.serverNamesPattern
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: license
|
||||
type: string
|
||||
description: Apache License, Version 2.0
|
||||
hidden: true
|
||||
required: false
|
||||
- name: enablePHP
|
||||
label: Enable PHP
|
||||
type: boolean
|
||||
description: >-
|
||||
Add php support to the Apache WebServer
|
||||
initial: false
|
||||
required: false
|
||||
- name: assignFloatingIP
|
||||
type: boolean
|
||||
label: Assign Floating IP
|
||||
description: >-
|
||||
Select to true to assign floating IP automatically
|
||||
initial: false
|
||||
required: false
|
||||
- name: numNodes
|
||||
type: integer
|
||||
label: Initial number of Nodes
|
||||
initial: 1
|
||||
minValue: 1
|
||||
required: true
|
||||
description: >-
|
||||
Select the initial number of Apache Nodes
|
||||
- name: threshhold
|
||||
type: integer
|
||||
label: Burst threshhold
|
||||
initial: 10
|
||||
minValue: 2
|
||||
required: true
|
||||
description: >-
|
||||
Nodes started from this number are allocated in the second region
|
||||
- name: region1
|
||||
type: string
|
||||
label: Region 1 name
|
||||
initial: RegionOne
|
||||
required: true
|
||||
description: >-
|
||||
Name of the first region
|
||||
- name: region2
|
||||
type: string
|
||||
label: Region 2 name
|
||||
required: true
|
||||
initial: RegionTwo
|
||||
description: >-
|
||||
Name of the second region
|
||||
- name: serverNamesPattern
|
||||
type: string
|
||||
label: Instance names pattern
|
||||
required: false
|
||||
maxLength: 64
|
||||
initial: 'node-{0}'
|
||||
|
||||
- instanceConfiguration1:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: string
|
||||
label: Instance flavor
|
||||
description: Instance flavor name
|
||||
required: true
|
||||
initial: 'm1.small'
|
||||
- name: osImage
|
||||
type: string
|
||||
label: Instance image
|
||||
required: true
|
||||
description: >-
|
||||
Name or ID of the image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: string
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Key pair to control access to instances. You can login to
|
||||
instances using this key pair after the deployment of application.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: string
|
||||
label: Availability zone
|
||||
description: Availability zone for the instance
|
||||
required: false
|
||||
initial: nova
|
||||
|
||||
- instanceConfiguration2:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: string
|
||||
label: Instance flavor name
|
||||
description: Instance flavor name
|
||||
required: true
|
||||
initial: 'm1.small'
|
||||
- name: osImage
|
||||
type: string
|
||||
label: Instance image
|
||||
description: >-
|
||||
Name or ID of the image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: string
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Key pair to control access to instances. You can login to
|
||||
instances using this key pair after the deployment of application.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: string
|
||||
label: Availability zone
|
||||
description: Availability zone for the instance
|
||||
required: false
|
||||
initial: nova
|
||||
|
||||
|
Before Width: | Height: | Size: 33 KiB |
@ -1,31 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.example.apache.BurstingApacheHttpServer
|
||||
Name: Bursting Apache HTTP Server
|
||||
Description: |
|
||||
The Apache HTTP Server Project is an effort to develop and maintain an
|
||||
open-source HTTP server for modern operating systems including UNIX and
|
||||
Windows NT. The goal of this project is to provide a secure, efficient and
|
||||
extensible server that provides HTTP services in sync with the current HTTP
|
||||
standards.
|
||||
Apache httpd has been the most popular web server on the Internet since
|
||||
April 1996, and celebrated its 17th birthday as a project this February.
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: [HTTP, Server, WebServer, HTML, Apache]
|
||||
Classes:
|
||||
com.example.apache.BurstingApacheHttpServer: BurstingApacheHttpServer.yaml
|
||||
|
||||
Require:
|
||||
io.murano.applications:
|
@ -1,19 +0,0 @@
|
||||
The source repository for this project can be found at:
|
||||
|
||||
https://opendev.org/openstack/murano-apps
|
||||
|
||||
Pull requests submitted through GitHub are not monitored.
|
||||
|
||||
To start contributing to OpenStack, follow the steps in the contribution guide
|
||||
to set up and use Gerrit:
|
||||
|
||||
https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
|
||||
|
||||
Bugs should be filed on Launchpad:
|
||||
|
||||
https://bugs.launchpad.net/murano-apps
|
||||
|
||||
For more specific information about contributing to this repository, see the
|
||||
murano-apps contributor guide:
|
||||
|
||||
https://opendev.org/openstack/murano-apps/src/branch/master/doc/source/contributor/contributing.rst
|
@ -1,77 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.apache
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
|
||||
|
||||
Name: CassandraCluster
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
name:
|
||||
Contract: $.string().notNull()
|
||||
|
||||
seedNodes:
|
||||
Contract: [$.class(CassandraNode).notNull()]
|
||||
|
||||
regularNodes:
|
||||
Contract: [$.class(CassandraNode).notNull()]
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $._environment.reporter.report($this, 'Creating VMs for Cassandra cluster')
|
||||
|
||||
# Spawn VMs in parallel
|
||||
- Parallel:
|
||||
- $.seedNodes.pselect($.spawnInstance())
|
||||
- $.regularNodes.pselect($.spawnInstance())
|
||||
|
||||
# Collect internal IPs of seed nodes
|
||||
- $seedNodesAsString: $.seedNodes.select($.getInternalIp()).join(',')
|
||||
|
||||
# Deploy Cassandra with default conf
|
||||
- Parallel:
|
||||
- $.seedNodes.pselect($.deployInstance())
|
||||
- $.regularNodes.pselect($.deployInstance())
|
||||
|
||||
- $msg: format('Deployed {0} seed nodes and {1} usual nodes', len($.seedNodes), len($.regularNodes))
|
||||
- $._environment.reporter.report($this, $msg)
|
||||
|
||||
# Update configuration (identical on all nodes)
|
||||
- Parallel:
|
||||
- $.seedNodes.pselect($.updateConfiguration($this.name, $seedNodesAsString))
|
||||
- $.regularNodes.pselect($.updateConfiguration($this.name, $seedNodesAsString))
|
||||
|
||||
# Restart nodes for changes to take an effect
|
||||
- $msg: format('Restarting all nodes in the cluster')
|
||||
- $._environment.reporter.report($this, $msg)
|
||||
- $.seedNodes.pselect($.restartCassandra(delay => 1))
|
||||
|
||||
# No parallel there because usual nodes have to be started one by one
|
||||
# Uses delay of restart for usual nodes to give seed nodes time on slow envs
|
||||
- $.regularNodes.select($.restartCassandra(delay => 120))
|
||||
|
||||
- $._environment.reporter.report($this, 'Cassandra cluster is deployed')
|
||||
- $._environment.reporter.report($this, 'Log in to any instance and use "nodetool status" to check')
|
||||
- $.setAttr(deployed, true)
|
@ -1,119 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.apache
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
conf: io.murano.configuration
|
||||
|
||||
Name: CassandraNode
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
instance:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
|
||||
updateConfiguration:
|
||||
Arguments:
|
||||
- clusterName:
|
||||
Contract: $.string().notNull()
|
||||
- seedNodes:
|
||||
Contract: $.string().notNull()
|
||||
|
||||
Body:
|
||||
# Listen address is internal (so it gets resolved by node itself correctly)
|
||||
- $listenAddress: $.instance.ipAddresses[0]
|
||||
|
||||
- $replacements:
|
||||
"%LISTEN_ADDRESS%": $listenAddress
|
||||
"%CLUSTER_NAME%": $clusterName
|
||||
"%SEED_NODES%": $seedNodes
|
||||
- $file: sys:Resources.string('updateCassandraYaml.sh').replace($replacements)
|
||||
- conf:Linux.runCommand($.instance.agent, $file)
|
||||
|
||||
- $msg: format('Updating Cassandra configuration at node "{0}"', $listenAddress)
|
||||
- $._environment.reporter.report($this, $msg)
|
||||
|
||||
|
||||
configureSecurityGroups:
|
||||
Body:
|
||||
# Based on Cassandra 2.1 defaults
|
||||
- $securityGroupIngress:
|
||||
# Cassandra JMX monitoring port
|
||||
- ToPort: 7199
|
||||
FromPort: 7199
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
# Cassandra inter-node cluster communication
|
||||
- ToPort: 7000
|
||||
FromPort: 7000
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
# Cassandra SSL inter-node cluster communication
|
||||
- ToPort: 7001
|
||||
FromPort: 7001
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
# Cassandra client port (Thrift)
|
||||
- ToPort: 9160
|
||||
FromPort: 9160
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
# Cassandra client port
|
||||
- ToPort: 9042
|
||||
FromPort: 9042
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- $._environment.securityGroupManager.addGroupIngress($securityGroupIngress)
|
||||
|
||||
spawnInstance:
|
||||
Body:
|
||||
- $msg: format('Creating a VM for Cassandra node "{0}"', $.instance.name)
|
||||
- $._environment.reporter.report($this, $msg)
|
||||
- $.configureSecurityGroups()
|
||||
- $.instance.deploy()
|
||||
- $address: $.instance.ipAddresses[0]
|
||||
- $._environment.reporter.report($this, 'Instance "{0}" is created'.format($address))
|
||||
|
||||
deployInstance:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $address: $.instance.ipAddresses[0]
|
||||
- $._environment.reporter.report($this, 'Deploying Cassandra node "{0}"'.format($address))
|
||||
- $file: sys:Resources.string('deployCassandra.sh')
|
||||
- conf:Linux.runCommand($.instance.agent, $file)
|
||||
- $.setAttr(deployed, true)
|
||||
|
||||
getInternalIp:
|
||||
Body:
|
||||
- Return: $.instance.ipAddresses[0]
|
||||
|
||||
## Restarts an existing Cassandra after given delay (in seconds)
|
||||
restartCassandra:
|
||||
Arguments:
|
||||
- delay:
|
||||
Contract: $.int().notNull()
|
||||
Body:
|
||||
- $msg: format('Restarting Cassandra node "{0}"', $.instance.name)
|
||||
- $._environment.reporter.report($this, $msg)
|
||||
- $command: format('sleep {0}; sudo service cassandra restart', $delay)
|
||||
- conf:Linux.runCommand($.instance.agent, $command)
|
||||
|
@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
## Add public keys and signatures
|
||||
gpg --keyserver pgp.mit.edu --recv-keys F758CE318D77295D
|
||||
gpg --export --armor F758CE318D77295D | sudo apt-key add -
|
||||
|
||||
# Starting from Debian 0.7.5, more keys
|
||||
gpg --keyserver pgp.mit.edu --recv-keys 2B5C1B00
|
||||
gpg --export --armor 2B5C1B00 | sudo apt-key add -
|
||||
|
||||
gpg --keyserver pgp.mit.edu --recv-keys 0353B12C
|
||||
gpg --export --armor 0353B12C | sudo apt-key add -
|
||||
|
||||
## Add Apache Software Foundation repositories
|
||||
sudo sh -c 'echo "deb http://www.apache.org/dist/cassandra/debian 21x main" > /etc/apt/sources.list.d/apache-cassandra.sources.list'
|
||||
sudo sh -c 'echo "deb-src http://www.apache.org/dist/cassandra/debian 21x main" >> /etc/apt/sources.list.d/apache-cassandra.sources.list'
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
## Install from package
|
||||
sudo apt-get -y install cassandra cassandra-tools
|
||||
|
||||
## Stop Cassandra and delete initial tables (to change name from Test Cluster)
|
||||
sudo service cassandra stop
|
||||
sudo rm -rf /var/lib/cassandra/data/*
|
||||
sudo rm -rf /var/lib/cassandra/commitlog/*
|
||||
sudo rm -rf /var/lib/cassandra/saved_caches/*
|
||||
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
## Restart service for any changes to take the effect
|
||||
# Sleep for some time added as a helper
|
||||
TIME="$1"
|
||||
|
||||
sleep "${TIME}"
|
||||
sudo service cassandra restart
|
@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
## Configure Cassandra to use seed nodes
|
||||
# Set cluster name
|
||||
sed -e "s/cluster_name:.*/cluster_name: \'%CLUSTER_NAME%\'/g" -i /etc/cassandra/cassandra.yaml
|
||||
# Seed provider class name
|
||||
sed -e "s/- class_name:.*/- class_name: org.apache.cassandra.locator.SimpleSeedProvider/g" -i /etc/cassandra/cassandra.yaml
|
||||
# Set seed nodes - nodes used to bootstrap other nodes
|
||||
sed -e "s/seeds:.*/seeds: \"$SEED_NODES\"/g" -i /etc/cassandra/cassandra.yaml
|
||||
# Set listen address and endpoint snitch class
|
||||
sed -e "s/listen_address:.*/listen_address: %LISTEN_ADDRESS%/g" -i /etc/cassandra/cassandra.yaml
|
||||
sed -e "s/endpoint_snitch:.*/endpoint_snitch: GossipingPropertyFileSnitch/g" -i /etc/cassandra/cassandra.yaml
|
||||
# Set RPC address
|
||||
sed -e "s/^rpc_address:.*/rpc_address: 0.0.0.0/g" -i /etc/cassandra/cassandra.yaml
|
||||
sed -e "s/#\s*broadcast_rpc_address:.*/broadcast_rpc_address: %LISTEN_ADDRESS%/g" -i /etc/cassandra/cassandra.yaml
|
||||
|
@ -1,134 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2
|
||||
|
||||
Templates:
|
||||
seedNode:
|
||||
?:
|
||||
type: com.example.apache.CassandraNode
|
||||
instance:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: generateHostname($.appConfiguration.unitNamingPattern, $index)
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
availabilityZone: $.instanceConfiguration.availabilityZone
|
||||
|
||||
regularNode:
|
||||
?:
|
||||
type: com.example.apache.CassandraNode
|
||||
instance:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: generateHostname($.appConfiguration.unitNamingPattern, $index + $.appConfiguration.countOfSeedNodes)
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
availabilityZone: $.instanceConfiguration.availabilityZone
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.example.apache.CassandraCluster
|
||||
name: $.appConfiguration.name
|
||||
seedNodes: repeat($seedNode, $.appConfiguration.countOfSeedNodes)
|
||||
regularNodes: repeat($regularNode, $.appConfiguration.countOfRegularNodes)
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: license
|
||||
type: string
|
||||
description: Apache License, Version 2.0
|
||||
hidden: true
|
||||
required: false
|
||||
- name: name
|
||||
type: string
|
||||
label: Cluster Name
|
||||
initial: CassandraCluster
|
||||
description: >-
|
||||
Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and
|
||||
underline are allowed
|
||||
- name: countOfSeedNodes
|
||||
type: integer
|
||||
label: Count of seed nodes
|
||||
initial: 1
|
||||
minValue: 0
|
||||
required: true
|
||||
description: >-
|
||||
Select the number of seed nodes. Seed nodes are used to bootstrap
|
||||
other nodes(which is the process of a new node joining an existing
|
||||
cluster) and setup the communication
|
||||
- name: countOfRegularNodes
|
||||
type: integer
|
||||
label: Count of regular nodes
|
||||
initial: 1
|
||||
required: true
|
||||
minValue: 0
|
||||
description: >-
|
||||
Select the number of Cassandra nodes (except seed nodes)
|
||||
- name: assignFloatingIP
|
||||
type: boolean
|
||||
initial: true
|
||||
label: Assign floating IP to nodes
|
||||
description: >-
|
||||
Check to assign floating IP to nodes
|
||||
required: false
|
||||
- name: unitNamingPattern
|
||||
type: string
|
||||
initial: cassandra-#
|
||||
helpText: "# expands to machine sequence number"
|
||||
required: false
|
||||
description: >-
|
||||
For your convenience instance hostname can be specified.
|
||||
Enter a name or leave blank for random name generation.
|
||||
regexpValidator: '^[a-zA-z][-_\w#]*$'
|
||||
maxLength: 64
|
||||
errorMessages:
|
||||
invalid: Just letters, numbers, underscores, sharps and hyphens are allowed.
|
||||
label: Cassandra node hostname pattern
|
||||
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which application would be created.
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select one of the existing flavors. Consider that application performance
|
||||
depends on this parameter.
|
||||
- name: osImage
|
||||
type: image
|
||||
imageType: linux
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select a valid image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: keypair
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Select the Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select an availability zone where the application would be installed.
|
||||
required: false
|
Before Width: | Height: | Size: 9.0 KiB |
@ -1,24 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.example.apache.Cassandra
|
||||
Name: Apache Cassandra
|
||||
Description: |
|
||||
Cassandra is a highly scalable, eventually consistent, distributed,
|
||||
structured key-value store.
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: [NoSQL, Database, CQL, Apache, Java]
|
||||
Classes:
|
||||
com.example.apache.CassandraNode: CassandraNode.yaml
|
||||
com.example.apache.CassandraCluster: CassandraCluster.yaml
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
install-packages chef
|
@ -1,42 +0,0 @@
|
||||
Chef Elements
|
||||
===============
|
||||
|
||||
This folder contains necessary DIB elements to build Chef image
|
||||
expected by "Git Chef" Murano application.
|
||||
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
1. Install diskimage-builder
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo pip install diskimage-builder
|
||||
|
||||
2. Install qemu-utils and kpartx
|
||||
|
||||
|
||||
On Ubuntu, Debian:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo apt-get install qemu-utils kpartx
|
||||
|
||||
On Centos, Fedora:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo yum install qemu-utils kpartx
|
||||
|
||||
|
||||
Image building
|
||||
--------------
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo ELEMENTS_PATH=${murano_agent_root}/contrib/elements:${murano_apps_root}/Chef/GitChef/elements disk-image-create \
|
||||
vm ubuntu murano-agent chef -o ubuntu14.04-x64-chef
|
||||
|
||||
Where ${murano_agent_root} is a path to murano-agent files
|
||||
and ${murano_apps_root} is a path to murano-apps files.
|
@ -1,60 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.conflang.chef
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
|
||||
|
||||
Name: GitChef
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
|
||||
instance:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
|
||||
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $._environment.reporter.report($this, 'Creating VM for Git Chef example ')
|
||||
- $securityGroupIngress:
|
||||
- ToPort: 22
|
||||
FromPort: 22
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- $._environment.securityGroupManager.addGroupIngress($securityGroupIngress)
|
||||
- $.instance.deploy()
|
||||
- $resources: new(sys:Resources)
|
||||
# Deploy Chef example
|
||||
- $template: $resources.yaml('DeployGitChef.template')
|
||||
|
||||
- $._environment.reporter.report($this, 'Instance is created. Deploying Git Chef')
|
||||
- $.instance.agent.call($template, $resources)
|
||||
- If: $.instance.assignFloatingIp
|
||||
Then:
|
||||
- $host: $.instance.floatingIpAddress
|
||||
Else:
|
||||
- $host: $.instance.ipAddresses[0]
|
||||
- $._environment.reporter.report($this, format('Git Chef is installed at {0}', $host))
|
||||
- $.setAttr(deployed, true)
|
@ -1,37 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.1.0
|
||||
Version: 1.0.0
|
||||
Name: Deploy Git Chef
|
||||
|
||||
Body: |
|
||||
return executeRecipe(args).stdout
|
||||
|
||||
Scripts:
|
||||
executeRecipe:
|
||||
Type: Chef
|
||||
Version: 1.0.0
|
||||
EntryPoint: git::default
|
||||
Files:
|
||||
- git: https://github.com/jssjr/git.git
|
||||
- yum-epel: https://github.com/chef-cookbooks/yum-epel.git
|
||||
- yum: https://github.com/chef-cookbooks/yum.git
|
||||
- dmg: https://github.com/opscode-cookbooks/dmg
|
||||
- openssl: https://github.com/opscode-cookbooks/openssl.git
|
||||
- chef-sugar: https://github.com/sethvargo/chef-sugar.git
|
||||
- chef_handler: https://github.com/opscode-cookbooks/chef_handler
|
||||
- windows: https://github.com/opscode-cookbooks/windows
|
||||
- build-essential: https://github.com/opscode-cookbooks/build-essential
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,110 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2.2
|
||||
|
||||
Templates:
|
||||
customJoinNet:
|
||||
- ?:
|
||||
type: io.murano.resources.ExistingNeutronNetwork
|
||||
internalNetworkName: $.instanceConfiguration.network[0]
|
||||
internalSubnetworkName: $.instanceConfiguration.network[1]
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.example.conflang.chef.GitChef
|
||||
instance:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: generateHostname($.instanceConfiguration.unitNamingPattern, 1)
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
availabilityZone: $.instanceConfiguration.availabilityZone
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
networks:
|
||||
useEnvironmentNetwork: $.instanceConfiguration.network[0]=null
|
||||
useFlatNetwork: false
|
||||
customNetworks: switch($.instanceConfiguration.network[0], $=null=>list(), $!=null=>$customJoinNet)
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: license
|
||||
type: string
|
||||
description: ' '
|
||||
hidden: true
|
||||
required: false
|
||||
- name: assignFloatingIP
|
||||
type: boolean
|
||||
label: Assign Floating IP
|
||||
description: >-
|
||||
Select to assign floating IP automatically
|
||||
initial: true
|
||||
required: false
|
||||
- name: dcInstances
|
||||
type: integer
|
||||
hidden: true
|
||||
initial: 1
|
||||
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that application performance
|
||||
depends on this parameter.
|
||||
required: false
|
||||
- name: osImage
|
||||
type: image
|
||||
imageType: linux
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select valid image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: keypair
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Select the Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment of application.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where application would be installed.
|
||||
required: false
|
||||
- name: network
|
||||
type: network
|
||||
label: Network
|
||||
description: Select a network to join. 'Auto' corresponds to a default environment's network.
|
||||
required: false
|
||||
murano_networks: translate
|
||||
- name: unitNamingPattern
|
||||
type: string
|
||||
label: Instance Naming Pattern
|
||||
required: false
|
||||
maxLength: 64
|
||||
regexpValidator: '^[a-zA-z][-_\w]*$'
|
||||
errorMessages:
|
||||
invalid: Just letters, numbers, underscores and hyphens are allowed.
|
||||
helpText: Just letters, numbers, underscores and hyphens are allowed.
|
||||
description: >-
|
||||
Specify a string, that will be used in instance hostname.
|
||||
Just A-Z, a-z, 0-9, dash and underline are allowed.
|
||||
|
Before Width: | Height: | Size: 3.8 KiB |
@ -1,22 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.example.conflang.chef.GitChef
|
||||
Name: GitChef
|
||||
Description: |
|
||||
Git Chef.
|
||||
Author: 'TID'
|
||||
Tags: [Test, Chef]
|
||||
Classes:
|
||||
com.example.conflang.chef.GitChef: GitChef.yaml
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
install-packages chef
|
@ -1,42 +0,0 @@
|
||||
Chef Elements
|
||||
===============
|
||||
|
||||
This folder contains necessary DIB elements to build Chef image
|
||||
expected by "Orion Chef" Murano application.
|
||||
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
1. Install diskimage-builder
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo pip install diskimage-builder
|
||||
|
||||
2. Install qemu-utils and kpartx
|
||||
|
||||
|
||||
On Ubuntu, Debian:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo apt-get install qemu-utils kpartx
|
||||
|
||||
On Centos, Fedora:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo yum install qemu-utils kpartx
|
||||
|
||||
|
||||
Image building
|
||||
--------------
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo ELEMENTS_PATH=${murano_agent_root}/contrib/elements:${murano_apps_root}/Chef/OrionChef/elements disk-image-create \
|
||||
vm ubuntu murano-agent chef -o ubuntu14.04-x64-chef
|
||||
|
||||
Where ${murano_agent_root} is a path to murano-agent files
|
||||
and ${murano_apps_root} is a path to murano-apps files.
|
@ -1,65 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.conflang.fiware
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
|
||||
|
||||
Name: OrionChef
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
|
||||
port:
|
||||
Contract: $.string().notNull()
|
||||
instance:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $._environment.reporter.report($this, 'Creating VM for Orion Chef ')
|
||||
- $securityGroupIngress:
|
||||
- ToPort: 22
|
||||
FromPort: 22
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: $.port
|
||||
FromPort: $.port
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- $._environment.securityGroupManager.addGroupIngress($securityGroupIngress)
|
||||
- $.instance.deploy()
|
||||
- $resources: new(sys:Resources)
|
||||
# Deploy Chef example
|
||||
- $template: $resources.yaml('DeployOrionChef.template').bind(dict( port => $.port))
|
||||
|
||||
- $._environment.reporter.report($this, 'Instance is created. Deploying Orion Chef')
|
||||
- $.instance.agent.call($template, $resources)
|
||||
- If: $.instance.assignFloatingIp
|
||||
Then:
|
||||
- $host: $.instance.floatingIpAddress
|
||||
Else:
|
||||
- $host: $.instance.ipAddresses[0]
|
||||
- $._environment.reporter.report($this, format('Orion is installed at {0} on {1} port', $host, $.port))
|
||||
- $.setAttr(deployed, true)
|
@ -1,37 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.1.0
|
||||
Version: 1.0.0
|
||||
Name: Deploy Orion Chef
|
||||
|
||||
Parameters:
|
||||
port: $port
|
||||
|
||||
Body: |
|
||||
return executeRecipe(args).stdout
|
||||
|
||||
Scripts:
|
||||
executeRecipe:
|
||||
Type: Chef
|
||||
Version: 1.0.0
|
||||
EntryPoint: orion::0.19.0_install
|
||||
Files:
|
||||
- orion: https://forge.fiware.org/scmrepos/svn/testbed/trunk/cookbooks/GESoftware/orion
|
||||
- orion-dbcluster: https://forge.fiware.org/scmrepos/svn/testbed/trunk/cookbooks/GESoftware/orion-dbcluster
|
||||
- mongodb: https://forge.fiware.org/scmrepos/svn/testbed/trunk/cookbooks/BaseSoftware/mongodb/
|
||||
- apt: https://forge.fiware.org/scmrepos/svn/testbed/trunk/cookbooks/BaseRecipes/apt/
|
||||
- yum: https://forge.fiware.org/scmrepos/svn/testbed/trunk/cookbooks/BaseRecipes/yum
|
||||
- build-essential: https://github.com/opscode-cookbooks/build-essential
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,117 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2.2
|
||||
|
||||
Templates:
|
||||
customJoinNet:
|
||||
- ?:
|
||||
type: io.murano.resources.ExistingNeutronNetwork
|
||||
internalNetworkName: $.instanceConfiguration.network[0]
|
||||
internalSubnetworkName: $.instanceConfiguration.network[1]
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.example.conflang.fiware.OrionChef
|
||||
port: $.appConfiguration.port
|
||||
instance:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: generateHostname($.instanceConfiguration.unitNamingPattern, 1)
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
availabilityZone: $.instanceConfiguration.availabilityZone
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
networks:
|
||||
useEnvironmentNetwork: $.instanceConfiguration.network[0]=null
|
||||
useFlatNetwork: false
|
||||
customNetworks: switch($.instanceConfiguration.network[0], $=null=>list(), $!=null=>$customJoinNet)
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: license
|
||||
type: string
|
||||
description: ' '
|
||||
hidden: true
|
||||
required: false
|
||||
- name: port
|
||||
type: integer
|
||||
label: Port
|
||||
description: 'Orion port'
|
||||
required: true
|
||||
initial: 1026
|
||||
- name: assignFloatingIP
|
||||
type: boolean
|
||||
label: Assign Floating IP
|
||||
description: >-
|
||||
Select to assign floating IP automatically
|
||||
initial: true
|
||||
required: false
|
||||
- name: dcInstances
|
||||
type: integer
|
||||
hidden: true
|
||||
initial: 1
|
||||
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that application performance
|
||||
depends on this parameter.
|
||||
required: false
|
||||
- name: osImage
|
||||
type: image
|
||||
imageType: linux
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select valid image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: keypair
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Select the Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment of application.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where application would be installed.
|
||||
required: false
|
||||
- name: network
|
||||
type: network
|
||||
label: Network
|
||||
description: Select a network to join. 'Auto' corresponds to a default environment's network.
|
||||
required: false
|
||||
murano_networks: translate
|
||||
- name: unitNamingPattern
|
||||
type: string
|
||||
label: Instance Naming Pattern
|
||||
required: false
|
||||
maxLength: 64
|
||||
regexpValidator: '^[a-zA-z][-_\w]*$'
|
||||
errorMessages:
|
||||
invalid: Just letters, numbers, underscores and hyphens are allowed.
|
||||
helpText: Just letters, numbers, underscores and hyphens are allowed.
|
||||
description: >-
|
||||
Specify a string, that will be used in instance hostname.
|
||||
Just A-Z, a-z, 0-9, dash and underline are allowed.
|
||||
|
Before Width: | Height: | Size: 26 KiB |
@ -1,22 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.example.conflang.fiware.OrionChef
|
||||
Name: OrionChef
|
||||
Description: |
|
||||
Orion Chef.
|
||||
Author: 'TID'
|
||||
Tags: [FIWARE, Orion, ContextBroker, Chef]
|
||||
Classes:
|
||||
com.example.conflang.fiware.OrionChef: OrionChef.yaml
|
@ -1,185 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.clearwater
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
meta: io.murano.metadata
|
||||
dns: com.mirantis.network.dns
|
||||
cwBase: com.mirantis.clearwater.components.base
|
||||
components: com.mirantis.clearwater.components
|
||||
|
||||
|
||||
|
||||
Name: Clearwater
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
dnsApp:
|
||||
Contract: $.class(dns:Bind).notNull()
|
||||
instanceTemplate:
|
||||
Contract: $.template(res:LinuxInstance)
|
||||
components:
|
||||
Contract:
|
||||
- $.class(cwBase:ClearwaterComponentBase).notNull()
|
||||
Usage: Out
|
||||
etcdClusterIp:
|
||||
Contract: $.string().notNull()
|
||||
Default: ""
|
||||
Usage: Out
|
||||
bonoClusterSize:
|
||||
Contract: $.int().notNull()
|
||||
Default: 1
|
||||
sproutClusterSize:
|
||||
Contract: $.int().notNull()
|
||||
Default: 1
|
||||
homerClusterSize:
|
||||
Contract: $.int().notNull()
|
||||
Default: 1
|
||||
homesteadClusterSize:
|
||||
Contract: $.int().notNull()
|
||||
Default: 1
|
||||
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
- If: not $.components
|
||||
Then:
|
||||
- $.components:
|
||||
- new(components:Ellis, $this, 'Ellis')
|
||||
- new(components:Ralf, $this, Ralf, allowedFailures => 'quorum')
|
||||
- new(components:Bono, $this, Bono, allowedFailures => 'quorum', clusterSize => $this.bonoClusterSize)
|
||||
- new(components:Sprout, $this, Sprout, allowedFailures => 'quorum', clusterSize => $this.sproutClusterSize)
|
||||
- new(components:Homer, $this, Homer, allowedFailures => 'quorum', clusterSize => $this.homerClusterSize)
|
||||
- new(components:Homestead, $this, Homestead, allowedFailures => 'quorum', clusterSize => $this.homesteadClusterSize)
|
||||
|
||||
getSecurityGroupRules:
|
||||
Body:
|
||||
- $rules:
|
||||
- FromPort: 22
|
||||
ToPort: 22
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
# SNMP
|
||||
- FromPort: 161
|
||||
ToPort: 161
|
||||
IpProtocol: udp
|
||||
External: true
|
||||
# etcd
|
||||
- FromPort: 2380
|
||||
ToPort: 2380
|
||||
IpProtocol: tcp
|
||||
External: false
|
||||
- FromPort: 4000
|
||||
ToPort: 4000
|
||||
IpProtocol: tcp
|
||||
External: false
|
||||
- Return: $rules
|
||||
|
||||
setEtcdClusterIp:
|
||||
Arguments:
|
||||
- ip:
|
||||
Contract: $.string().notNull()
|
||||
Body:
|
||||
- $.etcdClusterIp: $ip
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- $this._report('Start Clearwater deploy')
|
||||
- $this._environment.securityGroupManager.addGroupIngress($this.getSecurityGroupRules())
|
||||
- $this.dnsApp.deploy()
|
||||
- $this.components.pselect($.deploy())
|
||||
- $ellisFloatingIp: $this.components.where($ is components:Ellis).cluster.items.first().floatingIpAddress
|
||||
- $this._report(format('Use Ellis at {0} for create account and manage identities', $ellisFloatingIp))
|
||||
- $edgeProxyIp: $this.components.where($ is components:Bono).first().cluster.items.first().floatingIpAddress
|
||||
- $this._report(format('Outbound edge proxy IP is {0}', $edgeProxyIp))
|
||||
|
||||
_report:
|
||||
Arguments:
|
||||
- message:
|
||||
Contract: $.string().notNull()
|
||||
Body:
|
||||
- $._environment.reporter.report($this, $message)
|
||||
|
||||
# Lifecycle management
|
||||
|
||||
scaleOutSprout:
|
||||
Meta:
|
||||
- meta:Title:
|
||||
text: "Scale out Sprout"
|
||||
|
||||
Scope: Public
|
||||
Body:
|
||||
- $this.components.where($ is components:Sprout).first().scaleOut()
|
||||
|
||||
scaleOutBono:
|
||||
Meta:
|
||||
- meta:Title:
|
||||
text: "Scale out Bono"
|
||||
Scope: Public
|
||||
Body:
|
||||
- $this.components.where($ is components:Bono).first().scaleOut()
|
||||
|
||||
scaleOutHomestead:
|
||||
Meta:
|
||||
- meta:Title:
|
||||
text: "Scale out Homestead"
|
||||
Scope: Public
|
||||
Body:
|
||||
- $this.components.where($ is components:Homestead).first().scaleOut()
|
||||
|
||||
scaleOutRalf:
|
||||
Meta:
|
||||
- meta:Title:
|
||||
text: "Scale out Ralf"
|
||||
Scope: Public
|
||||
Body:
|
||||
- $this.components.where($ is components:Ralf).first().scaleOut()
|
||||
|
||||
scaleInSprout:
|
||||
Meta:
|
||||
- meta:Title:
|
||||
text: "Scale in Sprout"
|
||||
|
||||
Scope: Public
|
||||
Body:
|
||||
- $this.components.where($ is components:Sprout).first().scaleIn()
|
||||
|
||||
scaleInBono:
|
||||
Meta:
|
||||
- meta:Title:
|
||||
text: "Scale in Bono"
|
||||
Scope: Public
|
||||
Body:
|
||||
- $this.components.where($ is components:Bono).first().scaleIn()
|
||||
|
||||
scaleInHomestead:
|
||||
Meta:
|
||||
- meta:Title:
|
||||
text: "Scale in Homestead"
|
||||
Scope: Public
|
||||
Body:
|
||||
- $this.components.where($ is components:Homestead).first().scaleIn()
|
||||
|
||||
scaleInRalf:
|
||||
Meta:
|
||||
- meta:Title:
|
||||
text: "Scale in Ralf"
|
||||
Scope: Public
|
||||
Body:
|
||||
- $this.components.where($ is components:Ralf).first().scaleIn()
|
||||
|
||||
|
@ -1,58 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.clearwater.components
|
||||
base: com.mirantis.clearwater.components.base
|
||||
|
||||
Name: Bono
|
||||
|
||||
Extends: base:ClearwaterComponentBase
|
||||
|
||||
Methods:
|
||||
getSecurityRules:
|
||||
Body:
|
||||
- $rules:
|
||||
# STUN/TURN
|
||||
- FromPort: 3478
|
||||
ToPort: 3478
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- FromPort: 3478
|
||||
ToPort: 3478
|
||||
IpProtocol: udp
|
||||
External: true
|
||||
# Internal SIP
|
||||
- FromPort: 5058
|
||||
ToPort: 5058
|
||||
IpProtocol: tcp
|
||||
External: false
|
||||
# External SIP
|
||||
- FromPort: 5060
|
||||
ToPort: 5060
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- FromPort: 5060
|
||||
ToPort: 5060
|
||||
IpProtocol: udp
|
||||
External: true
|
||||
# External SIP/WebSocket
|
||||
- IpProtocol: tcp
|
||||
ToPort: 5062
|
||||
FromPort: 5062
|
||||
External: true
|
||||
# RTP
|
||||
- IpProtocol: udp
|
||||
FromPort: 32768
|
||||
ToPort: 65535
|
||||
External: true
|
||||
- Return: $rules
|
@ -1,36 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.clearwater.components
|
||||
base: com.mirantis.clearwater.components.base
|
||||
|
||||
Name: Ellis
|
||||
|
||||
Extends: base:ClearwaterComponentBase
|
||||
|
||||
Methods:
|
||||
|
||||
getSecurityRules:
|
||||
Body:
|
||||
- $rules:
|
||||
# HTTP
|
||||
- FromPort: 80
|
||||
ToPort: 80
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
# HTTPS
|
||||
- FromPort: 443
|
||||
ToPort: 443
|
||||
IpProtocol: udp
|
||||
External: true
|
||||
- Return: $rules
|
@ -1,44 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.clearwater.components
|
||||
base: com.mirantis.clearwater.components.base
|
||||
|
||||
Name: Homer
|
||||
|
||||
Extends: base:ClearwaterComponentBase
|
||||
|
||||
Methods:
|
||||
getSecurityRules:
|
||||
Body:
|
||||
- $rules:
|
||||
# Ut/HTTP
|
||||
- IpProtocol: tcp
|
||||
FromPort: 7888
|
||||
ToPort: 7888
|
||||
External: true
|
||||
- IpProtocol: tcp
|
||||
FromPort: 7888
|
||||
ToPort: 7888
|
||||
External: false
|
||||
# Cassandra
|
||||
- IpProtocol: tcp
|
||||
FromPort: 7000
|
||||
ToPort: 7000
|
||||
External: false
|
||||
- IpProtocol: tcp
|
||||
FromPort: 9160
|
||||
ToPort: 9160
|
||||
External: false
|
||||
|
||||
- Return: $rules
|
@ -1,48 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.clearwater.components
|
||||
base: com.mirantis.clearwater.components.base
|
||||
|
||||
Name: Homestead
|
||||
|
||||
Extends: base:ClearwaterComponentBase
|
||||
|
||||
Methods:
|
||||
getSecurityRules:
|
||||
Body:
|
||||
- $rules:
|
||||
# REST-ful Provisioning API
|
||||
- IpProtocol: tcp
|
||||
FromPort: 8889
|
||||
ToPort: 8889
|
||||
External: false
|
||||
# Cx-like HTTP API
|
||||
- IpProtocol: tcp
|
||||
FromPort: 8888
|
||||
ToPort: 8888
|
||||
External: false
|
||||
# Cassandra
|
||||
- IpProtocol: tcp
|
||||
FromPort: 7000
|
||||
ToPort: 7000
|
||||
External: false
|
||||
- IpProtocol: tcp
|
||||
FromPort: 9160
|
||||
ToPort: 9160
|
||||
External: false
|
||||
- IpProtocol: tcp
|
||||
FromPort: 7199
|
||||
ToPort: 7199
|
||||
External: false
|
||||
- Return: $rules
|
@ -1,49 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.clearwater.components
|
||||
base: com.mirantis.clearwater.components.base
|
||||
|
||||
Name: Ralf
|
||||
|
||||
Extends: base:ClearwaterComponentBase
|
||||
|
||||
Methods:
|
||||
getSecurityRules:
|
||||
Body:
|
||||
- $rules:
|
||||
# Rf-like/HTTP API
|
||||
- IpProtocol: tcp
|
||||
FromPort: 10888
|
||||
ToPort: 10888
|
||||
External: false
|
||||
- IpProtocol: tcp
|
||||
FromPort: 10888
|
||||
ToPort: 10888
|
||||
External: false
|
||||
# Chronos
|
||||
- IpProtocol: tcp
|
||||
FromPort: 7253
|
||||
ToPort: 7253
|
||||
External: false
|
||||
# Chronos timer pops
|
||||
- IpProtocol: tcp
|
||||
FromPort: 10888
|
||||
ToPort: 10888
|
||||
External: false
|
||||
# Memcached
|
||||
- IpProtocol: tcp
|
||||
FromPort: 11211
|
||||
ToPort: 11211
|
||||
External: false
|
||||
- Return: $rules
|
@ -1,49 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.clearwater.components
|
||||
base: com.mirantis.clearwater.components.base
|
||||
|
||||
Name: Sprout
|
||||
|
||||
Extends: base:ClearwaterComponentBase
|
||||
|
||||
Methods:
|
||||
getSecurityRules:
|
||||
Body:
|
||||
- $rules:
|
||||
# Internal SIP
|
||||
- IpProtocol: tcp
|
||||
FromPort: 5052
|
||||
ToPort: 5052
|
||||
External: false
|
||||
- IpProtocol: tcp
|
||||
FromPort: 5054
|
||||
ToPort: 5054
|
||||
External: false
|
||||
# Chronos
|
||||
- IpProtocol: tcp
|
||||
FromPort: 7253
|
||||
ToPort: 7253
|
||||
External: false
|
||||
# Chronos timer pops
|
||||
- IpProtocol: tcp
|
||||
FromPort: 9888
|
||||
ToPort: 9888
|
||||
External: false
|
||||
# Memcached
|
||||
- IpProtocol: tcp
|
||||
FromPort: 11211
|
||||
ToPort: 11211
|
||||
External: false
|
||||
- Return: $rules
|
@ -1,158 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.mirantis.clearwater.components.base
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
conf: io.murano.configuration
|
||||
apps: io.murano.applications
|
||||
cw: com.mirantis.clearwater
|
||||
|
||||
|
||||
|
||||
--- #-------------------------------------------------------------# ---
|
||||
|
||||
Name: ClearwaterServerProvider
|
||||
Extends: apps:TemplateServerProvider
|
||||
|
||||
Methods:
|
||||
releaseReplicas:
|
||||
Arguments:
|
||||
replicas:
|
||||
Contract:
|
||||
- $.class(res:Instance)
|
||||
Body:
|
||||
- $owner: $.find(ClearwaterComponentBase)
|
||||
- $replicas.select($owner.releaseServer($))
|
||||
- cast($this, apps:TemplateServerProvider).releaseReplicas($replicas)
|
||||
|
||||
--- #-------------------------------------------------------------# ---
|
||||
|
||||
Name: ClearwaterComponentBase
|
||||
|
||||
Extends:
|
||||
- apps:SoftwareComponent
|
||||
- apps:OpenStackSecurityConfigurable
|
||||
|
||||
Properties:
|
||||
clusterSize:
|
||||
Contract: $.int().notNull()
|
||||
Default: 1
|
||||
|
||||
cluster:
|
||||
Contract: $.class(apps:ServerReplicationGroup)
|
||||
Usage: Out
|
||||
|
||||
serverProvider:
|
||||
Contract: $.class(ClearwaterServerProvider)
|
||||
Usage: Out
|
||||
|
||||
Methods:
|
||||
_createReplacements:
|
||||
Arguments:
|
||||
- instance:
|
||||
Contract: $.class(res:LinuxInstance).notNull()
|
||||
- index:
|
||||
Contract: $.int().notNull()
|
||||
Body:
|
||||
- $instancePrivateIp: $instance.joinedNetworks.first().ipList.where($ != $instance.floatingIpAddress).first()
|
||||
- Return:
|
||||
"%INDEX%": $index
|
||||
"%PUBLIC_IP%": $instance.floatingIpAddress
|
||||
"%PRIVATE_IP%": $instancePrivateIp
|
||||
"%PRIVATE_NETWORK_CIDR%": $instance.joinedNetworks.first().network.describe().cidr
|
||||
"%PRIVATE_NETWORK_GATEWAY%": $instance.joinedNetworks.first().network.describe().gateway
|
||||
"%ZONE%": $.parent.dnsApp.zoneName
|
||||
"%DNSSEC_KEY%": $.parent.dnsApp.dnsSecKey
|
||||
"%DNS_PRIVATE_IP%": $.parent.dnsApp.instance.joinedNetworks.first().ipList
|
||||
.where($ = $instance.floatingIpAddress).first()
|
||||
"%ETCD_IP%": $.parent.etcdClusterIp or $instancePrivateIp
|
||||
|
||||
getDeployScriptName:
|
||||
Body:
|
||||
- Return: $this.componentName + '/deploy.sh'
|
||||
|
||||
getConfigureScriptName:
|
||||
Body:
|
||||
- Return: $this.componentName + '/configure.sh'
|
||||
|
||||
.init:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
- $.componentName: typeinfo($).name.split(".").last()
|
||||
- $.parent: $.find(cw:Clearwater).require()
|
||||
- $.serverProvider: $.serverProvider or new(ClearwaterServerProvider, $this,
|
||||
template => $.parent.instanceTemplate,
|
||||
serverNamePattern => $this.componentName + "-{}")
|
||||
- $.cluster: $.cluster or new(apps:ServerReplicationGroup, $this,
|
||||
provider => $this.serverProvider, minItems => 1, numItems => $this.clusterSize)
|
||||
|
||||
onInstallServer:
|
||||
Arguments:
|
||||
- instance:
|
||||
Contract: $.class(res:LinuxInstance).notNull()
|
||||
- serverGroup:
|
||||
Contract: $.class(apps:ServerReplicationGroup).notNull()
|
||||
Body:
|
||||
- $index: $serverGroup.getServers().indexWhere($.name = $instance.name)
|
||||
- $instancePrivateIp: $instance.joinedNetworks.first().ipList.where($ != $instance.floatingIpAddress).first()
|
||||
- If: not $.parent.etcdClusterIp
|
||||
Then:
|
||||
- $this.parent.setEtcdClusterIp($instancePrivateIp)
|
||||
- $replacements: $._createReplacements($instance, $index)
|
||||
- $file: sys:Resources.string($.getDeployScriptName()).replace($replacements)
|
||||
- conf:Linux.runCommand($instance.agent, $file)
|
||||
|
||||
|
||||
|
||||
onConfigureServer:
|
||||
Arguments:
|
||||
- instance:
|
||||
Contract: $.class(res:LinuxInstance).notNull()
|
||||
- serverGroup:
|
||||
Contract: $.class(apps:ServerReplicationGroup).notNull()
|
||||
Body:
|
||||
- $index: $serverGroup.getServers().indexWhere($.name = $instance.name)
|
||||
- $instancePrivateIp: $instance.joinedNetworks.first().ipList.where($ != $instance.floatingIpAddress).first()
|
||||
- $replacements: $._createReplacements($instance, $index)
|
||||
- $file: sys:Resources.string($.getConfigureScriptName()).replace($replacements)
|
||||
- conf:Linux.runCommand($instance.agent, $file)
|
||||
|
||||
releaseServer:
|
||||
Arguments:
|
||||
- instance:
|
||||
Contract: $.class(res:LinuxInstance).notNull()
|
||||
Body:
|
||||
- $index: $.cluster.getServers().indexWhere($.name = $instance.name)
|
||||
- $file: sys:Resources.string($.getUninstallScriptName())
|
||||
- conf:Linux.runCommand($instance.agent, $file)
|
||||
|
||||
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- $this.deployAt($this.cluster)
|
||||
|
||||
|
||||
scaleOut:
|
||||
Body:
|
||||
- $.report(format("Scale up {} cluster", $.componentName))
|
||||
- $this.cluster.scale(1)
|
||||
- $this.deploy()
|
||||
|
||||
|
||||
scaleIn:
|
||||
Body:
|
||||
- $this.cluster.scale(-1)
|
||||
- $this.deploy()
|
@ -1,31 +0,0 @@
|
||||
Clearwater vIMS Murano Package
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Clearwater is an open source implementation of IMS (the IP Multimedia
|
||||
Subsystem) designed from the ground up for massively scalable deployment
|
||||
in the Cloud to provide voice, video and messaging services to millions
|
||||
of users. Clearwater combines the economics of over-the-top style service
|
||||
platforms with the standards compliance expected of telco-grade communications
|
||||
network solutions, and its Cloud-oriented design makes it extremely
|
||||
well suited for deployment in a
|
||||
Network Functions Virtualization (NFV) environment.
|
||||
|
||||
*Requirements*
|
||||
|
||||
* Ubuntu 14.04 image with cloudinit
|
||||
* Tenant must be able to spawn 7 VMs with minimum requirements: 2GB RAM, 1 VCPU
|
||||
|
||||
*How to connect Softphone application to Clearwater environment*
|
||||
|
||||
* Find `Ellis` IP in environment deployment log, open Ellis's floating IP in new tab.
|
||||
Ellis can start with short delay after deployment finish.
|
||||
* Create new user via Ellis interface (secret code: secret)
|
||||
* Create new profile in Softphone app, use Private Identity account data
|
||||
* Use outbound proxy IP from environment deployment log
|
||||
* Use TCP transport
|
||||
|
||||
*How to run live tests*
|
||||
|
||||
* Checkout `https://github.com/Metaswitch/clearwater-live-test`_ repo
|
||||
* Install pre-requisites
|
||||
* Run `rake test[<DNS ZONE NAME>] SIGNUP_CODE=secret TRANSPORT=TCP PROXY=<OUTBOUND PROXY IP> ELLIS=<ELLIS IP>`
|
@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
configure() {
|
||||
set -x
|
||||
# Function to give DNS record type and IP address for specified IP address
|
||||
ip2rr() {
|
||||
if echo "$1" | grep -q -e '[^0-9.]' ; then
|
||||
echo AAAA "$1"
|
||||
else
|
||||
echo A "$1"
|
||||
fi
|
||||
}
|
||||
# Update DNS
|
||||
retries=0
|
||||
while ! { nsupdate -y "%ZONE%:%DNSSEC_KEY%" -v << EOF
|
||||
server %DNS_PRIVATE_IP%
|
||||
update add bono-%INDEX%.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
update add %INDEX%.bono.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
update add %ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
update add %ZONE%. 30 NAPTR 0 0 "s" "SIP+D2T" "" _sip._tcp.%ZONE%.
|
||||
update add %ZONE%. 30 NAPTR 0 0 "s" "SIP+D2U" "" _sip._udp.%ZONE%.
|
||||
update add _sip._tcp.%ZONE%. 30 SRV 0 0 5060 %INDEX%.bono.%ZONE%.
|
||||
update add _sip._udp.%ZONE%. 30 SRV 0 0 5060 %INDEX%.bono.%ZONE%.
|
||||
send
|
||||
EOF
|
||||
} && [ $retries -lt 10 ]
|
||||
do
|
||||
retries=$((retries + 1))
|
||||
echo 'nsupdate failed - retrying (retry '$retries')...'
|
||||
sleep 5
|
||||
done
|
||||
# Use the DNS server.
|
||||
echo 'nameserver %DNS_PRIVATE_IP%' > /etc/dnsmasq.resolv.conf
|
||||
echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq
|
||||
service dnsmasq force-reload
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
configure 2>&1|tee -a /var/log/clearwater-bono.log
|
@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
deploy() {
|
||||
set -x
|
||||
|
||||
# Configure the APT software source.
|
||||
echo 'deb http://repo.cw-ngv.com/archive/repo101 binary/' > /etc/apt/sources.list.d/clearwater.list
|
||||
curl -L http://repo.cw-ngv.com/repo_key | apt-key add -
|
||||
apt-get update
|
||||
# Configure /etc/clearwater/local_config.
|
||||
mkdir -p /etc/clearwater
|
||||
etcd_ip=%ETCD_IP%
|
||||
[ -n "$etcd_ip" ] || etcd_ip=%PRIVATE_IP%
|
||||
cat > /etc/clearwater/local_config << EOF
|
||||
management_local_ip=%PRIVATE_IP%
|
||||
local_ip=%PRIVATE_IP%
|
||||
public_ip=%PUBLIC_IP%
|
||||
public_hostname=%INDEX%.bono.%ZONE%
|
||||
etcd_cluster=$etcd_ip
|
||||
EOF
|
||||
|
||||
# Now install the software.
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install bono --yes --force-yes
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install clearwater-config-manager --yes --force-yes
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
deploy 2>&1|tee -a /var/log/clearwater-bono.log
|
@ -1,8 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
monit unmonitor -g bono
|
||||
sudo service bono quiesce
|
||||
sudo monit unmonitor clearwater_cluster_manager
|
||||
sudo monit unmonitor clearwater_config_manager
|
||||
sudo monit unmonitor -g etcd
|
||||
sudo service clearwater-etcd decommission
|
@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
configure() {
|
||||
set -x
|
||||
# Function to give DNS record type and IP address for specified IP address
|
||||
ip2rr() {
|
||||
if echo "$1" | grep -q -e '[^0-9.]' ; then
|
||||
echo AAAA "$1"
|
||||
else
|
||||
echo A "$1"
|
||||
fi
|
||||
}
|
||||
# Update DNS
|
||||
retries=0
|
||||
while ! { nsupdate -y "%ZONE%:%DNSSEC_KEY%" -v << EOF
|
||||
server %DNS_PRIVATE_IP%
|
||||
update add ellis-%INDEX%.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
update add ellis.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
send
|
||||
EOF
|
||||
} && [ $retries -lt 10 ]
|
||||
do
|
||||
retries=$((retries + 1))
|
||||
echo 'nsupdate failed - retrying (retry '$retries')...'
|
||||
sleep 5
|
||||
done
|
||||
# Use the DNS server.
|
||||
echo 'nameserver %DNS_PRIVATE_IP%' > /etc/dnsmasq.resolv.conf
|
||||
echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq
|
||||
service dnsmasq force-reload
|
||||
|
||||
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
configure 2>&1|tee -a /var/log/clearwater-ellis.log
|
@ -1,64 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
deploy() {
|
||||
set -x
|
||||
|
||||
# Configure the APT software source.
|
||||
echo 'deb http://repo.cw-ngv.com/archive/repo101 binary/' > /etc/apt/sources.list.d/clearwater.list
|
||||
curl -L http://repo.cw-ngv.com/repo_key | apt-key add -
|
||||
apt-get update
|
||||
# Configure /etc/clearwater/local_config.
|
||||
mkdir -p /etc/clearwater
|
||||
etcd_ip=%PRIVATE_IP%
|
||||
[ -n "$etcd_ip" ] || etcd_ip=%PRIVATE_IP%
|
||||
cat > /etc/clearwater/local_config << EOF
|
||||
local_ip=%PRIVATE_IP%
|
||||
public_ip=%PUBLIC_IP%
|
||||
public_hostname=ellis-%INDEX%.%ZONE%
|
||||
etcd_cluster=$etcd_ip
|
||||
EOF
|
||||
|
||||
# Now install the software.
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install ellis --yes --force-yes
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install clearwater-config-manager --yes --force-yes
|
||||
|
||||
# Wait until etcd is up and running before uploading the shared_config
|
||||
/usr/share/clearwater/clearwater-etcd/scripts/wait_for_etcd
|
||||
# Configure and upload /etc/clearwater/shared_config.
|
||||
cat > /etc/clearwater/shared_config << EOF
|
||||
# Deployment definitions
|
||||
home_domain=%ZONE%
|
||||
sprout_hostname=sprout.%ZONE%
|
||||
hs_hostname=hs.%ZONE%:8888
|
||||
hs_provisioning_hostname=hs-prov.%ZONE%:8889
|
||||
ralf_hostname=ralf.%ZONE%:10888
|
||||
xdms_hostname=homer.%ZONE%:7888
|
||||
|
||||
upstream_port=0
|
||||
# Email server configuration
|
||||
smtp_smarthost=localhost
|
||||
smtp_username=username
|
||||
smtp_password=password
|
||||
email_recovery_sender=clearwater@example.org
|
||||
|
||||
# Keys
|
||||
signup_key=secret
|
||||
turn_workaround=secret
|
||||
ellis_api_key=secret
|
||||
ellis_cookie_key=secret
|
||||
EOF
|
||||
|
||||
sudo /usr/share/clearwater/clearwater-config-manager/scripts/upload_shared_config
|
||||
# Tweak /etc/clearwater/shared_config to use homer's management hostname instead of signaling.
|
||||
# This works around https://github.com/Metaswitch/ellis/issues/153.
|
||||
sed -e 's/^xdms_hostname=.*$/xdms_hostname=homer-1.%ZONE%:7888/g' -i /etc/clearwater/shared_config
|
||||
sed -i 's|# server_names_hash_bucket_size.*|server_names_hash_bucket_size 64;|g' /etc/nginx/nginx.conf
|
||||
service clearwater-infrastructure restart
|
||||
service ellis stop
|
||||
# Allocate a allocate a pool of numbers to assign to users.
|
||||
/usr/share/clearwater/ellis/env/bin/python /usr/share/clearwater/ellis/src/metaswitch/ellis/tools/create_numbers.py --start 6505550000 --count 1000 --realm %ZONE%
|
||||
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
deploy 2>&1 | tee -a /var/log/clearwater-ellis.log
|
@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
monit unmonitor -g ellis
|
||||
sudo service ellis stop
|
||||
sudo monit unmonitor clearwater_cluster_manager
|
||||
sudo monit unmonitor clearwater_config_manager
|
||||
sudo monit unmonitor -g etcd
|
||||
sudo service clearwater-etcd decommission
|
@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
configure() {
|
||||
set -x
|
||||
# Function to give DNS record type and IP address for specified IP address
|
||||
ip2rr() {
|
||||
if echo "$1" | grep -q -e '[^0-9.]' ; then
|
||||
echo AAAA "$1"
|
||||
else
|
||||
echo A "$1"
|
||||
fi
|
||||
}
|
||||
# Update DNS
|
||||
retries=0
|
||||
while ! { nsupdate -y "%ZONE%:%DNSSEC_KEY%" -v << EOF
|
||||
server %DNS_PRIVATE_IP%
|
||||
update add homer-%INDEX%.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
update add homer.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
send
|
||||
EOF
|
||||
} && [ $retries -lt 10 ]
|
||||
do
|
||||
retries=$((retries + 1))
|
||||
echo 'nsupdate failed - retrying (retry '$retries')...'
|
||||
sleep 5
|
||||
done
|
||||
# Use the DNS server.
|
||||
echo 'nameserver %DNS_PRIVATE_IP%' > /etc/dnsmasq.resolv.conf
|
||||
echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq
|
||||
service dnsmasq force-reload
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
configure 2>&1|tee -a /var/log/clearwater-homer.log
|
@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
deploy() {
|
||||
|
||||
# Log all output to file.
|
||||
exec > >(tee -a /var/log/clearwater-homer.log) 2>&1
|
||||
set -x
|
||||
# Configure the APT software source.
|
||||
echo 'deb http://repo.cw-ngv.com/archive/repo101 binary/' > /etc/apt/sources.list.d/clearwater.list
|
||||
curl -L http://repo.cw-ngv.com/repo_key | apt-key add -
|
||||
apt-get update
|
||||
# Configure /etc/clearwater/local_config.
|
||||
mkdir -p /etc/clearwater
|
||||
etcd_ip=%ETCD_IP%
|
||||
[ -n "$etcd_ip" ] || etcd_ip=%PRIVATE_IP%
|
||||
cat > /etc/clearwater/local_config << EOF
|
||||
management_local_ip=%PRIVATE_IP%
|
||||
local_ip=%PRIVATE_IP%
|
||||
public_ip=%PUBLIC_IP%
|
||||
public_hostname=homer-%INDEX%.%ZONE%
|
||||
etcd_cluster=$etcd_ip
|
||||
EOF
|
||||
|
||||
# Now install the software.
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install clearwater-cassandra --yes --force-yes
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install homer --yes --force-yes
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
deploy 2>&1 | tee -a /var/log/clearwater-homer.log
|
@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
monit unmonitor -g homer
|
||||
sudo service homer stop
|
||||
sudo monit unmonitor clearwater_cluster_manager
|
||||
sudo monit unmonitor clearwater_config_manager
|
||||
sudo monit unmonitor -g etcd
|
||||
sudo service clearwater-etcd decommission
|
@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
configure() {
|
||||
set -x
|
||||
# Function to give DNS record type and IP address for specified IP address
|
||||
ip2rr() {
|
||||
if echo "$1" | grep -q -e '[^0-9.]' ; then
|
||||
echo AAAA "$1"
|
||||
else
|
||||
echo A "$1"
|
||||
fi
|
||||
}
|
||||
# Update DNS
|
||||
retries=0
|
||||
while ! { nsupdate -y "%ZONE%:%DNSSEC_KEY%" -v << EOF
|
||||
server %DNS_PRIVATE_IP%
|
||||
update add homestead-%INDEX%.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
update add hs-prov.%ZONE%. 30 $(ip2rr %PRIVATE_IP%)
|
||||
update add hs.%ZONE%. 30 $(ip2rr %PRIVATE_IP%)
|
||||
send
|
||||
EOF
|
||||
} && [ $retries -lt 10 ]
|
||||
do
|
||||
retries=$((retries + 1))
|
||||
echo 'nsupdate failed - retrying (retry '$retries')...'
|
||||
sleep 5
|
||||
done
|
||||
# Use the DNS server.
|
||||
echo 'nameserver %DNS_PRIVATE_IP%' > /etc/dnsmasq.resolv.conf
|
||||
echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq
|
||||
service dnsmasq force-reload
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
configure 2>&1|tee -a /var/log/clearwater-homestead.log
|
@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
deploy() {
|
||||
set -x
|
||||
|
||||
# Configure the APT software source.
|
||||
echo 'deb http://repo.cw-ngv.com/archive/repo101 binary/' > /etc/apt/sources.list.d/clearwater.list
|
||||
curl -L http://repo.cw-ngv.com/repo_key | apt-key add -
|
||||
apt-get update
|
||||
# Configure /etc/clearwater/local_config.
|
||||
mkdir -p /etc/clearwater
|
||||
etcd_ip=%ETCD_IP%
|
||||
[ -n "$etcd_ip" ] || etcd_ip=%PRIVATE_IP%
|
||||
cat > /etc/clearwater/local_config << EOF
|
||||
management_local_ip=%PRIVATE_IP%
|
||||
local_ip=%PRIVATE_IP%
|
||||
public_ip=%PRIVATE_IP%
|
||||
public_hostname=homestead-%INDEX%.%ZONE%
|
||||
etcd_cluster=$etcd_ip
|
||||
EOF
|
||||
|
||||
# Now install the software.
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install homestead homestead-prov clearwater-prov-tools --yes
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
deploy 2>&1 | tee -a /var/log/clearwater-homestead.log
|
@ -1,8 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
monit unmonitor -g homestead
|
||||
monit unmonitor -g homestead-prov
|
||||
sudo service homestead stop && sudo service homestead-prov stop
|
||||
sudo monit unmonitor clearwater_cluster_manager
|
||||
sudo monit unmonitor clearwater_config_manager
|
||||
sudo monit unmonitor -g etcd
|
||||
sudo service clearwater-etcd decommission
|
@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
configure() {
|
||||
set -x
|
||||
# Function to give DNS record type and IP address for specified IP address
|
||||
ip2rr() {
|
||||
if echo "$1" | grep -q -e '[^0-9.]' ; then
|
||||
echo AAAA "$1"
|
||||
else
|
||||
echo A "$1"
|
||||
fi
|
||||
}
|
||||
# Update DNS
|
||||
retries=0
|
||||
while ! { nsupdate -y "%ZONE%:%DNSSEC_KEY%" -v << EOF
|
||||
server %DNS_PRIVATE_IP%
|
||||
update add ralf-%INDEX%.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
update add ralf.%ZONE%. 30 $(ip2rr %PRIVATE_IP%)
|
||||
send
|
||||
EOF
|
||||
} && [ $retries -lt 10 ]
|
||||
do
|
||||
retries=$((retries + 1))
|
||||
echo 'nsupdate failed - retrying (retry '$retries')...'
|
||||
sleep 5
|
||||
done
|
||||
# Use the DNS server.
|
||||
echo 'nameserver %DNS_PRIVATE_IP%' > /etc/dnsmasq.resolv.conf
|
||||
echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq
|
||||
service dnsmasq force-reload
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
configure 2>&1|tee -a /var/log/clearwater-ralf.log
|
@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
deploy() {
|
||||
set -x
|
||||
|
||||
# Configure the APT software source.
|
||||
echo 'deb http://repo.cw-ngv.com/archive/repo101 binary/' > /etc/apt/sources.list.d/clearwater.list
|
||||
curl -L http://repo.cw-ngv.com/repo_key | apt-key add -
|
||||
apt-get update
|
||||
# Configure /etc/clearwater/local_config.
|
||||
mkdir -p /etc/clearwater
|
||||
etcd_ip=%ETCD_IP%
|
||||
[ -n "$etcd_ip" ] || etcd_ip=%PRIVATE_IP%
|
||||
cat > /etc/clearwater/local_config << EOF
|
||||
management_local_ip=%PRIVATE_IP%
|
||||
local_ip=%PRIVATE_IP%
|
||||
public_ip=%PRIVATE_IP%
|
||||
public_hostname=ralf-%INDEX%.%ZONE%
|
||||
etcd_cluster=$etcd_ip
|
||||
EOF
|
||||
# Create /etc/chronos/chronos.conf.
|
||||
mkdir -p /etc/chronos
|
||||
cat > /etc/chronos/chronos.conf << EOF
|
||||
[http]
|
||||
bind-address = %PRIVATE_IP%
|
||||
bind-port = 7253
|
||||
threads = 50
|
||||
[logging]
|
||||
folder = /var/log/chronos
|
||||
level = 2
|
||||
[alarms]
|
||||
enabled = true
|
||||
[exceptions]
|
||||
max_ttl = 600
|
||||
EOF
|
||||
|
||||
# Now install the software.
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install ralf --yes --force-yes
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
deploy 2>&1 | tee -a /var/log/clearwater-ralf.log
|
@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
monit unmonitor -g ralf
|
||||
sudo service ralf stop
|
||||
sudo monit unmonitor clearwater_cluster_manager
|
||||
sudo monit unmonitor clearwater_config_manager
|
||||
sudo monit unmonitor -g etcd
|
||||
sudo service clearwater-etcd decommission
|
@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
configure() {
|
||||
set -x
|
||||
|
||||
# Function to give DNS record type and IP address for specified IP address
|
||||
ip2rr() {
|
||||
if echo "$1" | grep -q -e '[^0-9.]' ; then
|
||||
echo AAAA "$1"
|
||||
else
|
||||
echo A "$1"
|
||||
fi
|
||||
}
|
||||
# Update DNS
|
||||
retries=0
|
||||
while ! { nsupdate -y "%ZONE%:%DNSSEC_KEY%" -v << EOF
|
||||
server %DNS_PRIVATE_IP%
|
||||
update add sprout-%INDEX%.%ZONE%. 30 $(ip2rr %PUBLIC_IP%)
|
||||
update add %INDEX%.sprout.%ZONE%. 30 $(ip2rr %PRIVATE_IP%)
|
||||
update add sprout.%ZONE%. 30 $(ip2rr %PRIVATE_IP%)
|
||||
update add scscf.sprout.%ZONE%. 30 $(ip2rr %PRIVATE_IP%)
|
||||
update add icscf.sprout.%ZONE%. 30 $(ip2rr %PRIVATE_IP%)
|
||||
update add sprout.%ZONE%. 30 NAPTR 0 0 "s" "SIP+D2T" "" _sip._tcp.sprout.%ZONE%.
|
||||
update add _sip._tcp.sprout.%ZONE%. 30 SRV 0 0 5054 %INDEX%.sprout.%ZONE%.
|
||||
update add icscf.sprout.%ZONE%. 30 NAPTR 0 0 "s" "SIP+D2T" "" _sip._tcp.icscf.sprout.%ZONE%.
|
||||
update add _sip._tcp.icscf.sprout.%ZONE%. 30 SRV 0 0 5052 %INDEX%.sprout.%ZONE%.
|
||||
update add scscf.sprout.%ZONE%. 30 NAPTR 0 0 "s" "SIP+D2T" "" _sip._tcp.scscf.sprout.%ZONE%.
|
||||
update add _sip._tcp.scscf.sprout.%ZONE%. 30 SRV 0 0 5054 %INDEX%.sprout.%ZONE%.
|
||||
send
|
||||
EOF
|
||||
} && [ $retries -lt 10 ]
|
||||
do
|
||||
retries=$((retries + 1))
|
||||
echo 'nsupdate failed - retrying (retry '$retries')...'
|
||||
sleep 5
|
||||
done
|
||||
# Use the DNS server.
|
||||
echo 'nameserver %DNS_PRIVATE_IP%' > /etc/dnsmasq.resolv.conf
|
||||
echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq
|
||||
service dnsmasq force-reload
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
configure 2>&1|tee -a /var/log/clearwater-sprout.log
|
@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
deploy() {
|
||||
set -x
|
||||
|
||||
# Configure the APT software source.
|
||||
echo 'deb http://repo.cw-ngv.com/archive/repo101 binary/' > /etc/apt/sources.list.d/clearwater.list
|
||||
curl -L http://repo.cw-ngv.com/repo_key | apt-key add -
|
||||
apt-get update
|
||||
# Configure /etc/clearwater/local_config.
|
||||
mkdir -p /etc/clearwater
|
||||
etcd_ip=%ETCD_IP%
|
||||
[ -n "$etcd_ip" ] || etcd_ip=%PRIVATE_IP%
|
||||
cat > /etc/clearwater/local_config << EOF
|
||||
management_local_ip=%PRIVATE_IP%
|
||||
local_ip=%PRIVATE_IP%
|
||||
public_ip=%PRIVATE_IP%
|
||||
public_hostname=%INDEX%.sprout.%ZONE%
|
||||
etcd_cluster=$etcd_ip
|
||||
EOF
|
||||
# Create /etc/chronos/chronos.conf.
|
||||
mkdir -p /etc/chronos
|
||||
cat > /etc/chronos/chronos.conf << EOF
|
||||
[http]
|
||||
bind-address = %PRIVATE_IP%
|
||||
bind-port = 7253
|
||||
threads = 50
|
||||
[logging]
|
||||
folder = /var/log/chronos
|
||||
level = 2
|
||||
[alarms]
|
||||
enabled = true
|
||||
[exceptions]
|
||||
max_ttl = 600
|
||||
EOF
|
||||
|
||||
# Now install the software.
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install sprout --yes --force-yes
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes
|
||||
}
|
||||
|
||||
# Log all output to file.
|
||||
deploy 2>&1 | tee -a /var/log/clearwater-sprout.log
|
@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
monit unmonitor -g sprout
|
||||
sudo service sprout quiesce
|
||||
sudo monit unmonitor clearwater_cluster_manager
|
||||
sudo monit unmonitor clearwater_config_manager
|
||||
sudo monit unmonitor -g etcd
|
||||
sudo service clearwater-etcd decommission
|
@ -1,102 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2.2
|
||||
|
||||
Templates:
|
||||
customJoinNet:
|
||||
- ?:
|
||||
type: io.murano.resources.ExistingNeutronNetwork
|
||||
internalNetworkName: $.instanceConfiguration.network[0]
|
||||
internalSubnetworkName: $.instanceConfiguration.network[1]
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.mirantis.clearwater.Clearwater
|
||||
instanceTemplate:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: anything
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
availabilityZone: $.instanceConfiguration.availabilityZone
|
||||
assignFloatingIp: true
|
||||
networks:
|
||||
useEnvironmentNetwork: $.instanceConfiguration.network[0]=null
|
||||
useFlatNetwork: false
|
||||
customNetworks: switch($.instanceConfiguration.network[0], $=null=>list(), $!=null=>$customJoinNet)
|
||||
dnsApp: $.appConfig.dnsServer
|
||||
bonoClusterSize: $.appConfig.bonoClusterSize
|
||||
sproutClusterSize: $.appConfig.sproutClusterSize
|
||||
homerClusterSize: $.appConfig.homerClusterSize
|
||||
homesteadClusterSize: $.appConfig.homesteadClusterSize
|
||||
|
||||
Forms:
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: keypair
|
||||
type: keypair
|
||||
label: keypair
|
||||
description: >-
|
||||
Select the Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment of application.
|
||||
required: false
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that application performance
|
||||
depends on this parameter.
|
||||
- name: osImage
|
||||
type: image
|
||||
label: Instance image
|
||||
imageType: linux
|
||||
description: >-
|
||||
Select valid Ubuntu 14.04 image with cloud-init preinstalled for the application.
|
||||
Image should already be prepared and registered in glance.
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where application would be installed.
|
||||
required: false
|
||||
- name: network
|
||||
type: network
|
||||
label: Network
|
||||
description: Select a network to join. 'Auto' corresponds to a default environment's network.
|
||||
required: false
|
||||
murano_networks: translate
|
||||
|
||||
- appConfig:
|
||||
fields:
|
||||
- name: dnsServer
|
||||
type: com.mirantis.network.dns.Bind
|
||||
label: DNS server
|
||||
description: >-
|
||||
Add internal DNS server application. DNS is used by Clearewater to refer to its nodes
|
||||
|
||||
- name: bonoClusterSize
|
||||
type: integer
|
||||
label: Bono cluster size
|
||||
initial: 1
|
||||
- name: sproutClusterSize
|
||||
type: integer
|
||||
label: Sprout cluster size
|
||||
initial: 1
|
||||
- name: homerClusterSize
|
||||
type: integer
|
||||
label: Homer cluster size
|
||||
initial: 1
|
||||
- name: homesteadClusterSize
|
||||
type: integer
|
||||
label: Homestead cluster size
|
||||
initial: 1
|
Before Width: | Height: | Size: 17 KiB |
@ -1,36 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.mirantis.clearwater.Clearwater
|
||||
Name: Clearwater
|
||||
Description: |
|
||||
Clearwater vIMS application
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: [vIMS]
|
||||
Classes:
|
||||
com.mirantis.clearwater.components.base.ClearwaterServerProvider: components/base/ClearwaterComponentBase.yaml
|
||||
com.mirantis.clearwater.Clearwater: Clearwater.yaml
|
||||
com.mirantis.clearwater.components.base.ClearwaterComponentBase: components/base/ClearwaterComponentBase.yaml
|
||||
com.mirantis.clearwater.components.Bono: components/Bono.yaml
|
||||
com.mirantis.clearwater.components.Ellis: components/Ellis.yaml
|
||||
com.mirantis.clearwater.components.Homer: components/Homer.yaml
|
||||
com.mirantis.clearwater.components.Homestead: components/Homestead.yaml
|
||||
com.mirantis.clearwater.components.Ralf: components/Ralf.yaml
|
||||
com.mirantis.clearwater.components.Sprout: components/Sprout.yaml
|
||||
|
||||
|
||||
Require:
|
||||
com.mirantis.network.dns.Bind:
|
||||
io.murano.applications:
|
||||
|
@ -1,100 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.paas
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
|
||||
Name: CloudFoundry
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
|
||||
instance:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $._environment.reporter.report($this, 'Creating VM for CloudFoundry ')
|
||||
- $securityGroupIngress:
|
||||
- ToPort: 80
|
||||
FromPort: 80
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: 65535
|
||||
FromPort: 1024
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: 443
|
||||
FromPort: 443
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- $._environment.securityGroupManager.addGroupIngress($securityGroupIngress)
|
||||
- $.instance.deploy()
|
||||
- $resources: new(sys:Resources)
|
||||
|
||||
#NOTE(ddovbii) This is workaround which forbids installing CF to non-Ubuntu images
|
||||
#As soon as we have the ability to filter images by distribution type
|
||||
#(https://blueprints.launchpad.net/murano/+spec/better-image-filtering)
|
||||
#this workaround should be deleted
|
||||
- $template: $resources.yaml('CheckOS.template')
|
||||
- $os: $.instance.agent.call($template, $resources)
|
||||
- If: not $os.startsWith('Ubuntu 14.04')
|
||||
Then:
|
||||
- $msg: 'Unable to deploy. Only Ubuntu 14.04 is supported'
|
||||
- $._environment.reporter.report_error($this, $msg)
|
||||
- Throw: UnsupportedDistributionVersion
|
||||
Message: $msg
|
||||
|
||||
#All steps below actually follow the process in ./scripts/install.sh
|
||||
# Just add more interactivity to provide status
|
||||
# Install Ruby part
|
||||
- $template: $resources.yaml('InstallRuby.template')
|
||||
- $._environment.reporter.report($this, '[1/6] Installing Ruby...')
|
||||
- $.instance.agent.call($template, $resources, 3600)
|
||||
|
||||
#Clone base repos
|
||||
- $template: $resources.yaml('CloneRepos.template')
|
||||
- $._environment.reporter.report($this, '[2/6]Cloning git repositories for BOSH and cf-release...')
|
||||
- $.instance.agent.call($template, $resources, 3600)
|
||||
|
||||
#Install Environment
|
||||
- $template: $resources.yaml('InstallEnvironment.template')
|
||||
- $._environment.reporter.report($this, '[3/6]Install Environment...')
|
||||
- $.instance.agent.call($template, $resources, 3600)
|
||||
|
||||
#Install CF release
|
||||
- $template: $resources.yaml('InstallCFRelease.template')
|
||||
- $._environment.reporter.report($this, '[4/6]Installing cf-release...')
|
||||
- $.instance.agent.call($template, $resources, 7200)
|
||||
|
||||
#Install CF CLI
|
||||
- $template: $resources.yaml('InstallCFcli.template')
|
||||
- $._environment.reporter.report($this, '[5/6]Installing CF CLI...')
|
||||
- $.instance.agent.call($template, $resources, 600)
|
||||
|
||||
- $template: $resources.yaml('StartCloudFoundry.template')
|
||||
- $._environment.reporter.report($this, '[6/6]Start CloudFoundry services...')
|
||||
- $result: $.instance.agent.call($template, $resources, 3600)
|
||||
- $._environment.reporter.report($this, 'CloudFoundry is started')
|
||||
- $._environment.reporter.report($this, $result)
|
||||
- $.setAttr(deployed, true)
|
@ -1,19 +0,0 @@
|
||||
=============
|
||||
Cloud Foundry
|
||||
=============
|
||||
|
||||
Cloud Foundry is an open platform as a service, providing a choice of clouds,
|
||||
developer frameworks, and application services. Cloud Foundry makes it faster
|
||||
and easier to build, test, deploy, and scale applications. It is an open source
|
||||
project and is available through a variety of private cloud distributions and
|
||||
public cloud instances.
|
||||
|
||||
This package deploys Cloud Foundry v2 in a single VM instance using cf_nise_installer:
|
||||
|
||||
https://github.com/yudai/cf_nise_installer
|
||||
|
||||
### Requirements
|
||||
|
||||
* Ubuntu 14.04 64bit (Trusty)
|
||||
* 8GB+ free HDD space
|
||||
* 2GB+ memory
|
@ -1,28 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Check OS Distribution
|
||||
|
||||
Body: |
|
||||
return checkOS().stdout
|
||||
|
||||
Scripts:
|
||||
checkOS:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: checkOS.sh
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
||||
|
@ -1,32 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Clone Repos
|
||||
|
||||
Parameters:
|
||||
appName: $appName
|
||||
|
||||
Body: |
|
||||
return deploy(args.appName).stdout
|
||||
|
||||
Scripts:
|
||||
deploy:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: cloneRepos.sh
|
||||
Files:
|
||||
- <common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,32 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Install CF Release
|
||||
|
||||
Parameters:
|
||||
appName: $appName
|
||||
|
||||
Body: |
|
||||
return deploy(args.appName).stdout
|
||||
|
||||
Scripts:
|
||||
deploy:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: installCFRelease.sh
|
||||
Files:
|
||||
- <common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,32 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Install CF cli
|
||||
|
||||
Parameters:
|
||||
appName: $appName
|
||||
|
||||
Body: |
|
||||
return deploy(args.appName).stdout
|
||||
|
||||
Scripts:
|
||||
deploy:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: installCFcli.sh
|
||||
Files:
|
||||
- <common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,32 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Install Environment
|
||||
|
||||
Parameters:
|
||||
appName: $appName
|
||||
|
||||
Body: |
|
||||
return deploy(args.appName).stdout
|
||||
|
||||
Scripts:
|
||||
deploy:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: installEnvironment.sh
|
||||
Files:
|
||||
- <common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,33 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Install Ruby
|
||||
|
||||
Parameters:
|
||||
appName: $appName
|
||||
|
||||
Body: |
|
||||
return deploy(args.appName).stdout
|
||||
|
||||
Scripts:
|
||||
deploy:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: installRuby.sh
|
||||
Files:
|
||||
- <installer.sh>
|
||||
- <common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,32 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Start CloudFoundry
|
||||
|
||||
Parameters:
|
||||
appName: $appName
|
||||
|
||||
Body: |
|
||||
return deploy(args.appName).stdout
|
||||
|
||||
Scripts:
|
||||
deploy:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: startCloudFoundry.sh
|
||||
Files:
|
||||
- <common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
command_exists() {
|
||||
command -v "$@" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
if command_exists lsb_release; then
|
||||
lsb_release -sd
|
||||
else
|
||||
echo "unknown version"
|
||||
fi
|
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
exec &> /tmp/clone_repos.log
|
||||
|
||||
function include(){
|
||||
curr_dir=$(cd "$(dirname "$0")" && pwd)
|
||||
inc_file_path=$curr_dir/$1
|
||||
if [ -f "$inc_file_path" ]; then
|
||||
. "$inc_file_path"
|
||||
else
|
||||
echo -e "$inc_file_path not found!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
include "common.sh"
|
||||
|
||||
cd /root/cf_nise_installer
|
||||
./scripts/clone_nise_bosh.sh
|
||||
./scripts/clone_cf_release.sh
|
@ -1,239 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
DEBUGLVL=3
|
||||
LOGFILE=/tmp/muranodeployment.log
|
||||
PIPAPPS="pip python-pip pip-python"
|
||||
PIPCMD=""
|
||||
if [ "$DEBUGLVL" -eq 4 ]; then
|
||||
set -x
|
||||
fi
|
||||
function log {
|
||||
if [ "$DEBUGLVL" -gt 0 ]; then
|
||||
chars=$(echo "@$" | wc -c)
|
||||
echo "Parsed chars: ${chars}"
|
||||
case $DEBUGLVL in
|
||||
1 )
|
||||
echo -e "LOG:>$@"
|
||||
;;
|
||||
2)
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M") LOG:>$@" | tee --append $LOGFILE
|
||||
;;
|
||||
3)
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M") LOG:>$@" >> $LOGFILE
|
||||
;;
|
||||
4)
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M") LOG:>$@" | tee --append $LOGFILE
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
function lowercase(){
|
||||
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
||||
}
|
||||
function find_pip()
|
||||
{
|
||||
for cmd in $PIPAPPS
|
||||
do
|
||||
_cmd=$(which "$cmd" 2>/dev/null)
|
||||
if [ $? -eq 0 ];then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -z $_cmd ]];then
|
||||
echo "Can't find \"pip\" in system, please install it first, exiting!"
|
||||
exit 1
|
||||
else
|
||||
export PIPCMD=$_cmd
|
||||
fi
|
||||
}
|
||||
OPTIND=1 # Reset if getopts used previously
|
||||
function collect_args(){
|
||||
_n=$1
|
||||
shift
|
||||
ARGS=''
|
||||
while true
|
||||
do
|
||||
if [[ "$_n" == -* ]] || [ -z "$_n" ]; then
|
||||
OPTIND=$((OPTIND - 1))
|
||||
break
|
||||
fi
|
||||
#echo "_n=$_n ; $OPTIND"
|
||||
if [ -z "$ARGS" ]; then
|
||||
ARGS=$OPTARG
|
||||
else
|
||||
ARGS="$ARGS $_n"
|
||||
fi
|
||||
eval _n=\$$OPTIND
|
||||
OPTIND=$((OPTIND + 1))
|
||||
#sleep 1
|
||||
done
|
||||
echo "${ARGS}"
|
||||
unset _n
|
||||
unset ARGS
|
||||
}
|
||||
function get_os(){
|
||||
# (azvyagintsev) export variables just for clearing shellcheck warning's
|
||||
export KERNEL=$(uname -r)
|
||||
export MACH=$(uname -m)
|
||||
export OS=$(uname)
|
||||
if [ "${OS}" = "Linux" ] ; then
|
||||
if [ -f /etc/redhat-release ] ; then
|
||||
export DistroBasedOn='RedHat'
|
||||
export Packager='yum'
|
||||
export DIST=$(< /etc/redhat-release sed s/\ release.*// )
|
||||
export PSUEDONAME=$(< /etc/redhat-release sed -e s/.*\(// -e s/\)// )
|
||||
export REV=$(< /etc/redhat-release sed -e s/.*release\ // -e s/\ .*//)
|
||||
elif [ -f /etc/SuSE-release ] ; then
|
||||
export DistroBasedOn='SuSe'
|
||||
export Packager='zypper'
|
||||
export PSUEDONAME=$(< /etc/SuSE-release tr "\n" ' '| sed s/VERSION.*//)
|
||||
export REV=$(< /etc/SuSE-release tr "\n" ' ' | sed s/.*=\ //)
|
||||
elif [ -f /etc/mandrake-release ] ; then
|
||||
export DistroBasedOn='Mandrake'
|
||||
export Packager='urpmi urpme'
|
||||
export PSUEDONAME=$(< /etc/mandrake-release sed s/.*\(// | sed s/\)//)
|
||||
export REV=$(< /etc/mandrake-release sed s/.*release\ // | sed s/\ .*//)
|
||||
elif [ -f /etc/debian_version ] ; then
|
||||
export DistroBasedOn='Debian'
|
||||
export Packager='apt-get'
|
||||
export DIST=$(< /etc/lsb-release grep '^DISTRIB_ID' | awk -F= '{ print $2 }')
|
||||
export PSUEDONAME=$(< /etc/lsb-release grep '^DISTRIB_CODENAME' | awk -F= '{ print $2 }')
|
||||
export REV=$(< /etc/lsb-release grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }')
|
||||
fi
|
||||
if [ -f /etc/UnitedLinux-release ] ; then
|
||||
DIST="${DIST}[$(< /etc/UnitedLinux-release tr "\n" ' ' | sed s/VERSION.*//)]"
|
||||
fi
|
||||
OS=$(lowercase "$OS")
|
||||
DistroBasedOn=$(lowercase "$DistroBasedOn")
|
||||
readonly OS
|
||||
readonly DIST
|
||||
readonly DistroBasedOn
|
||||
readonly PSUEDONAME
|
||||
readonly REV
|
||||
readonly KERNEL
|
||||
readonly MACH
|
||||
#readonly Packager
|
||||
else
|
||||
OS=unknown
|
||||
readonly OS
|
||||
log "OS:$OS"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
function add_fw_rule(){
|
||||
_rule_string=$*
|
||||
_tmp_fw_port=$(echo "$_rule_string" | grep -o -e "dport [0-9]*\s")
|
||||
_tmp_fw_proto=$(echo "$_rule_string" | grep -o -e "-p \w*\s")
|
||||
_fw_port=$(echo "$_tmp_fw_port" | awk '{print $2}')
|
||||
_fw_proto=$(echo "$_tmp_fw_proto" |awk '{print $2}')
|
||||
_fw_reload=""
|
||||
# (azvyagintsev) Do echo just for remove shellcheck warning
|
||||
echo "${_fw_reload}" >> /dev/null
|
||||
#find iptables and add rule
|
||||
case "$DIST" in
|
||||
"Fedora")
|
||||
_fw_cmd=$(which firewall-cmd)
|
||||
_fw_port=$(echo "$_rule_string" | grep -o -e "dport [0-9]*\s" | awk '{print $2}')
|
||||
_fw_proto=$(echo "$_rule_string" | grep -o -e "-p \w*\s" | awk '{print $2}')
|
||||
_fw_rule="--permanent --add-port=$_fw_port/$_fw_proto"
|
||||
_fw_enable_rules="$_fw_cmd --reload"
|
||||
;;
|
||||
*)
|
||||
_fw_cmd=$(which iptables)
|
||||
_fw_rule=$_rule_string
|
||||
_fw_enable_rules="service $(basename "$_fw_cmd") save"
|
||||
;;
|
||||
esac
|
||||
iptcmdsave=$(which iptables-save)
|
||||
if [[ "$_fw_cmd" != '' ]] && [[ "$iptcmdsave" != '' ]]; then
|
||||
eval "$iptcmdsave | grep -e \"$_tmp_fw_port\" | grep -e \"$_tmp_fw_proto\"" > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
eval "$_fw_cmd $_fw_rule"
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Can't set firewall rules, exiting..."
|
||||
exit 1
|
||||
else
|
||||
if [ -n "$_fw_enable_rules" ]; then
|
||||
log "Running \"$_fw_enable_rules\""
|
||||
$_fw_enable_rules > /dev/null
|
||||
fi
|
||||
log "$_fw_cmd rule with $_fw_rule set."
|
||||
fi
|
||||
else
|
||||
log "$_fw_cmd rule exists."
|
||||
fi
|
||||
else
|
||||
log "There are no fw found..."
|
||||
fi
|
||||
}
|
||||
function enable_init(){
|
||||
_initctrl=""
|
||||
_init_suffix=""
|
||||
_service=$1
|
||||
case $DistroBasedOn in
|
||||
"debian")
|
||||
_initctrl="update-rc.d"
|
||||
_init_suffix="defaults"
|
||||
;;
|
||||
*)
|
||||
_initctrl="chkconfig"
|
||||
_init_suffix="on"
|
||||
;;
|
||||
esac
|
||||
eval "$_initctrl $_service $_init_suffix"
|
||||
if [ $? -ne 0 ]; then
|
||||
log "$_initctrl $_service $_init_suffix - fails!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
function restart_service(){
|
||||
_service="$1"
|
||||
service "$_service" restart > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Can't start $_service service!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
function package_renamer(){
|
||||
_pkg="$1"
|
||||
case "$DistroBasedOn" in
|
||||
"debian")
|
||||
_pkg=$(echo "$_pkg" | sed 's/-devel$/-dev/')
|
||||
;;
|
||||
*)
|
||||
_pkg=$(echo "$_pkg" | sed 's/-dev$/-devel/')
|
||||
;;
|
||||
esac
|
||||
echo "$_pkg"
|
||||
}
|
||||
function retry()
|
||||
{
|
||||
local n=0
|
||||
local try=$1
|
||||
local cmd="${*:2}"
|
||||
[[ $# -le 1 ]] && {
|
||||
echo "Usage $0 <retry_number> <Command>"; }
|
||||
until [[ $n -ge $try ]]
|
||||
do
|
||||
if eval "$cmd"; then
|
||||
echo "Command: ${cmd} done.."
|
||||
break
|
||||
else
|
||||
echo "Command Fail.."
|
||||
((n++))
|
||||
echo "retry $n ::"
|
||||
sleep 1;
|
||||
fi
|
||||
done
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
exec &> /tmp/install_cf_release.log
|
||||
|
||||
function include(){
|
||||
curr_dir=$(cd "$(dirname "$0")" && pwd)
|
||||
inc_file_path=$curr_dir/$1
|
||||
if [ -f "$inc_file_path" ]; then
|
||||
. "$inc_file_path"
|
||||
else
|
||||
echo -e "$inc_file_path not found!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
include "common.sh"
|
||||
. ~/.profile
|
||||
|
||||
if [ ! -e /tmp/wagrant-reboot ] ; then
|
||||
cd /root/cf_nise_installer
|
||||
retry 3 ./scripts/install_cf_release.sh
|
||||
touch /tmp/wagrant-reboot
|
||||
reboot
|
||||
fi
|
||||
|
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
exec &> /tmp/install_cf_cli.log
|
||||
|
||||
function include(){
|
||||
curr_dir=$(cd "$(dirname "$0")" && pwd)
|
||||
inc_file_path=$curr_dir/$1
|
||||
if [ -f "$inc_file_path" ]; then
|
||||
. "$inc_file_path"
|
||||
else
|
||||
echo -e "$inc_file_path not found!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
include "common.sh"
|
||||
|
||||
cd /root
|
||||
wget https://s3.amazonaws.com/go-cli/releases/v6.1.2/cf-cli_amd64.deb -O cf-cli_amd64.deb
|
||||
dpkg --install cf-cli_amd64.deb
|
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
exec &> /tmp/install_environemnt.log
|
||||
|
||||
function include(){
|
||||
curr_dir=$(cd "$(dirname "$0")" && pwd)
|
||||
inc_file_path=$curr_dir/$1
|
||||
if [ -f "$inc_file_path" ]; then
|
||||
. "$inc_file_path"
|
||||
else
|
||||
echo -e "$inc_file_path not found!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
include "common.sh"
|
||||
|
||||
cd /root/cf_nise_installer
|
||||
./scripts/install_environemnt.sh
|
||||
|
@ -1,37 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
exec &> /tmp/install_ruby.log
|
||||
|
||||
function include(){
|
||||
curr_dir=$(cd "$(dirname "$0")" && pwd)
|
||||
inc_file_path=$curr_dir/$1
|
||||
if [ -f "$inc_file_path" ]; then
|
||||
. "$inc_file_path"
|
||||
else
|
||||
echo -e "$inc_file_path not found!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
include "common.sh"
|
||||
|
||||
apt-get update
|
||||
apt-get install -y curl git wget
|
||||
|
||||
sed -i 's/^mesg n$/tty -s \&\& mesg n/g' /root/.profile
|
||||
|
||||
cd /root
|
||||
git clone https://github.com/yudai/cf_nise_installer.git
|
||||
|
||||
cd /root/cf_nise_installer
|
||||
retry 3 ./scripts/install_ruby.sh
|
@ -1,153 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
INSTALLER_OPTS=""
|
||||
UNINSTALLER_OPTS=""
|
||||
PMGR=""
|
||||
PMGR_LIST_OPTS=""
|
||||
|
||||
function include(){
|
||||
curr_dir=$(cd "$(dirname "$0")" && pwd)
|
||||
inc_file_path=$curr_dir/$1
|
||||
if [ -f "$inc_file_path" ]; then
|
||||
. "$inc_file_path"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
function set_install_options(){
|
||||
case $1 in
|
||||
apt-get )
|
||||
INSTALLER_OPTS="-y -q install"
|
||||
UNINSTALLER_OPTS="-y -q remove"
|
||||
PMGR="dpkg"
|
||||
PMGR_LIST_OPTS="-s"
|
||||
;;
|
||||
yum )
|
||||
INSTALLER_OPTS="--assumeyes install"
|
||||
UNINSTALLER_OPTS="--assumeyes erase"
|
||||
PMGR="rpm"
|
||||
PMGR_LIST_OPTS="-q"
|
||||
;;
|
||||
urpm* )
|
||||
INSTALLER_OPTS="-y"
|
||||
UNINSTALLER_OPTS=""
|
||||
PMGR="rpm"
|
||||
PMGR_LIST_OPTS="-q"
|
||||
;;
|
||||
zypper )
|
||||
INSTALLER_OPTS="install"
|
||||
UNINSTALLER_OPTS="remove --quiet"
|
||||
PMGR="rpm"
|
||||
PMGR_LIST_OPTS="-q"
|
||||
;;
|
||||
pip )
|
||||
INSTALLER_OPTS="install"
|
||||
UNINSTALLER_OPTS="uninstall --yes"
|
||||
find_pip
|
||||
PACKAGER=$PIPCMD
|
||||
PMGR=$PIPCMD
|
||||
PMGR_LIST_OPTS="freeze | grep"
|
||||
;;
|
||||
* )
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
PACKAGER=$(which "$1")
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Can't find \"$1\", exiting!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
function package_install(){
|
||||
PKG=$1
|
||||
eval "$PMGR $PMGR_LIST_OPTS $PKG" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
log "\"$PKG\" already installed"
|
||||
else
|
||||
log "Installing \"$PKG\" ..."
|
||||
eval "$PACKAGER $INSTALLER_OPTS $PKG" > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
log "\"$PKG\" installation fails, exiting!"
|
||||
exit 1
|
||||
else
|
||||
log "\t\t...success"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
function package_uninstall(){
|
||||
PKG=$1
|
||||
eval "$PMGR $PMGR_LIST_OPTS $PKG" > /dev/null 2>&1
|
||||
if [ $? -eq 1 ]; then
|
||||
log "\"$PKG\" not installed"
|
||||
else
|
||||
log "Uninstalling \"$PKG\" ..."
|
||||
eval "$PACKAGER $UNINSTALLER_OPTS $PKG" > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
log "\"$PKG\" uninstallation fails, exiting!"
|
||||
exit 1
|
||||
else
|
||||
log "\t\t...success"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
function run_install(){
|
||||
for PKG in "$@"
|
||||
do
|
||||
package_install "$PKG"
|
||||
done
|
||||
}
|
||||
function run_uninstall(){
|
||||
for PKG in "$@"
|
||||
do
|
||||
package_uninstall "$PKG"
|
||||
done
|
||||
}
|
||||
# Main workflow
|
||||
include "common.sh"
|
||||
if [ $# -eq 0 ]; then
|
||||
script=$(basename "$0")
|
||||
echo -e "Usage:\n\t* install packages -- ./$script -p package_manager -i package0 [packageN]\n\t* remove packages -- ./$script -p package_manager -r package0 [packageN]"
|
||||
exit 1
|
||||
fi
|
||||
Packager=''
|
||||
get_os
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Unsupported *nix version ($DistroBasedOn - $DIST/$PSUEDONAME/$REV/$MACH)"
|
||||
exit 1
|
||||
fi
|
||||
while getopts ":p:i:r:" opt ; do
|
||||
case "$opt" in
|
||||
p)
|
||||
if [[ "$OPTARG" != sys ]]; then
|
||||
Packager=$OPTARG
|
||||
fi
|
||||
set_install_options "$Packager"
|
||||
;;
|
||||
i)
|
||||
n=$OPTARG
|
||||
run_install "$(collect_args "$n" "$@")"
|
||||
break;
|
||||
;;
|
||||
r)
|
||||
n=$OPTARG
|
||||
run_uninstall "$(collect_args "$n" "$@")"
|
||||
break;
|
||||
;;
|
||||
\?)
|
||||
log "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 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.
|
||||
|
||||
exec &> /tmp/start_cf.log
|
||||
|
||||
function include(){
|
||||
curr_dir=$(cd "$(dirname "$0")" && pwd)
|
||||
inc_file_path=$curr_dir/$1
|
||||
if [ -f "$inc_file_path" ]; then
|
||||
. "$inc_file_path"
|
||||
else
|
||||
echo -e "$inc_file_path not found!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
include "common.sh"
|
||||
. ~/.profile
|
||||
|
||||
cd /root/cf_nise_installer
|
||||
./scripts/start.sh | tee start.log
|
||||
/var/vcap/bosh/bin/monit restart cloud_controller_ng
|
||||
./scripts/start.sh | tee start.log
|
||||
|
||||
tail start.log | grep Login
|
||||
|
||||
#add_fw_rule '-I INPUT 1 -p tcp -m tcp --dport 8080 -j ACCEPT -m comment --comment "by murano, CloudFoundry"'
|
||||
|
||||
|
@ -1,94 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Version: 2.2
|
||||
|
||||
Templates:
|
||||
customJoinNet:
|
||||
- ?:
|
||||
type: io.murano.resources.ExistingNeutronNetwork
|
||||
internalNetworkName: $.instanceConfiguration.network[0]
|
||||
internalSubnetworkName: $.instanceConfiguration.network[1]
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: com.example.paas.CloudFoundry
|
||||
instance:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: generateHostname($.instanceConfiguration.unitNamingPattern, 1)
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
networks:
|
||||
useEnvironmentNetwork: $.instanceConfiguration.network[0]=null
|
||||
useFlatNetwork: false
|
||||
customNetworks: switch($.instanceConfiguration.network[0], $=null=>list(), $!=null=>$customJoinNet)
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: license
|
||||
type: string
|
||||
description: Apache License, Version 2.0
|
||||
hidden: true
|
||||
required: false
|
||||
- name: assignFloatingIP
|
||||
type: boolean
|
||||
label: Assign Floating IP
|
||||
description: >-
|
||||
Select to true to assign floating IP automatically
|
||||
initial: false
|
||||
required: false
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
requirements:
|
||||
min_disk: 8
|
||||
min_vcpus: 2
|
||||
min_memory_mb: 2048
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that application performance
|
||||
depends on this parameter.
|
||||
required: false
|
||||
- name: osImage
|
||||
type: image
|
||||
imageType: linux
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select a valid image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: keypair
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Select a Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment of application.
|
||||
required: false
|
||||
- name: network
|
||||
type: network
|
||||
label: Network
|
||||
description: Select a network to join. 'Auto' corresponds to a default environment's network.
|
||||
required: false
|
||||
murano_networks: translate
|
||||
- name: unitNamingPattern
|
||||
label: Hostname
|
||||
type: string
|
||||
required: false
|
Before Width: | Height: | Size: 50 KiB |
@ -1,22 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Format: 1.3
|
||||
Type: Application
|
||||
FullName: com.example.paas.CloudFoundry
|
||||
Name: Cloud Foundry
|
||||
Description: |
|
||||
Cloud Foundry is an opensource PaaS solution. PaaS makes platform much easier to deploy, run and scale applications. Some PaaS offerings have limited language and framework support, do not deliver key application services, or restrict deployment to a single cloud. Cloud Foundry is the industry’s Open PaaS and provides a choice of clouds, frameworks and application services. As an open source project, there is a broad community both contributing and supporting Cloud Foundry.
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: ['PAAS']
|
||||
Classes:
|
||||
com.example.paas.CloudFoundry: CloudFoundry.yaml
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
# enable cgroups in kernel
|
||||
sed -i -e 's/\(^GRUB_CMDLINE_LINUX.*\)"$/\1 cgroup_enable=memory swapaccount=1"/' /etc/default/grub
|
||||
update-grub
|
@ -1,152 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
function retry()
|
||||
{
|
||||
local n=0
|
||||
local try=$1
|
||||
local cmd="${@: 2}"
|
||||
[[ $# -le 1 ]] && {
|
||||
echo "Usage $0 <retry_number> <Command>"; }
|
||||
until [[ $n -ge $try ]]
|
||||
do
|
||||
$cmd && break || {
|
||||
echo "Command Fail.."
|
||||
((n++))
|
||||
echo "retry $n ::"
|
||||
sleep 1;
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
install-packages git build-essential ruby ruby-dev libxml2-dev libsqlite3-dev libxslt1-dev libpq-dev libmysqlclient-dev quota cmake unzip
|
||||
|
||||
# install spiff
|
||||
wget https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.3/spiff_linux_amd64.zip -O /tmp/spiff_linux_amd64.zip
|
||||
unzip /tmp/spiff_linux_amd64.zip -d /usr/local/bin/
|
||||
rm /tmp/spiff_linux_amd64.zip
|
||||
|
||||
# install bosh_cli
|
||||
gem install bundler bosh_cli --no-ri --no-rdoc
|
||||
|
||||
# prepare repos
|
||||
mkdir /root/workspace
|
||||
# CF
|
||||
cd /root/workspace
|
||||
git clone https://github.com/cloudfoundry/cf-release
|
||||
cd /root/workspace/cf-release
|
||||
# checkout to release-207
|
||||
#git reset --hard afbe01cecc67fc4fe45a1a7cfc774fc2baa25d6c
|
||||
git checkout v207
|
||||
# update
|
||||
git submodule sync
|
||||
git submodule foreach --recursive 'git submodule sync; git clean -d --force --force'
|
||||
git submodule update --init --recursive --force
|
||||
git clean -ffd
|
||||
# remove buildpacks
|
||||
cat << EOF > /root/workspace/remove-cf-buildpacks.patch
|
||||
diff --git a/config/blobs.yml b/config/blobs.yml
|
||||
index c048acc..fc6c0b3 100644
|
||||
--- a/config/blobs.yml
|
||||
+++ b/config/blobs.yml
|
||||
@@ -115,32 +115,3 @@ consul/consul_0.5.0_linux_amd64.zip:
|
||||
object_id: 3e6c1e47-95a5-45ef-aeec-2cb4cc4c529a
|
||||
sha: 00e4c6e9ff2fb326d3b586fd86c3037f3b7e0974
|
||||
size: 4669655
|
||||
-go-buildpack/go_buildpack-cached-v1.2.0.zip:
|
||||
- object_id: da609e02-aec5-4d54-93bc-86ca0b44eed7
|
||||
- sha: e58788c873ddbecd641532f32ce4d535b2a79f81
|
||||
- size: 663443569
|
||||
-python-buildpack/python_buildpack-cached-v1.2.0.zip:
|
||||
- object_id: 3e8561a1-7cdc-45c2-9eff-b8d49ebc4e88
|
||||
- sha: 2ca4545ab99ac2a2e430f58fe1ec55fe6b96a7b3
|
||||
- size: 685706721
|
||||
-ruby-buildpack/ruby_buildpack-cached-v1.3.0.zip:
|
||||
- object_id: 3d8d4bfc-91b2-419b-857d-9f26e31340bd
|
||||
- sha: 5dde3ea0e15908554eaa5b12df38652436c469b5
|
||||
- size: 966348817
|
||||
-php-buildpack/php_buildpack-offline-v3.1.0.zip:
|
||||
- object_id: b817bdc3-4765-423c-aebd-195b980550a3
|
||||
- sha: 9bb6c36e13976288c62794f8dcb06965ef898033
|
||||
- size: 1089981446
|
||||
-nodejs-buildpack/nodejs_buildpack-cached-v1.2.1.zip:
|
||||
- object_id: 21a8eb83-97b9-49cd-ba57-bd2cca1f9133
|
||||
- sha: !binary |-
|
||||
- OGM1MzQwNTdmYzFmZTBjY2JkZmE1NTQ3YzI1ZjMwYWQ3OWRkMzY4ZA==
|
||||
- size: 437119230
|
||||
-java-buildpack/java-buildpack-offline-v3.0.zip:
|
||||
- object_id: 8fe6e89a-aa63-4119-8fd0-23715820f31d
|
||||
- sha: a300c3fca530dc16345dbd6feb26b13897d05265
|
||||
- size: 324816174
|
||||
-java-buildpack/java-buildpack-v3.0.zip:
|
||||
- object_id: 34bff29b-9ec3-42aa-891f-db301f7f978d
|
||||
- sha: 177715b012505051d14611bf706f0ebe50cc55f0
|
||||
- size: 150091
|
||||
diff --git a/jobs/cloud_controller_ng/spec b/jobs/cloud_controller_ng/spec
|
||||
index 82a4545..90281eb 100644
|
||||
--- a/jobs/cloud_controller_ng/spec
|
||||
+++ b/jobs/cloud_controller_ng/spec
|
||||
@@ -29,13 +29,6 @@ packages:
|
||||
- libpq
|
||||
- mysqlclient
|
||||
- ruby-2.1.4
|
||||
- - buildpack_java
|
||||
- - buildpack_java_offline
|
||||
- - buildpack_ruby
|
||||
- - buildpack_nodejs
|
||||
- - buildpack_go
|
||||
- - buildpack_python
|
||||
- - buildpack_php
|
||||
|
||||
properties:
|
||||
ssl.skip_cert_verify:
|
||||
EOF
|
||||
patch -p1 < /root/workspace/remove-cf-buildpacks.patch
|
||||
rm -f /root/workspace/remove-cf-buildpacks.patch
|
||||
rm -rf packages/buildpack_*
|
||||
|
||||
# Diego
|
||||
cd /root/workspace
|
||||
git clone https://github.com/cloudfoundry-incubator/diego-release
|
||||
cd /root/workspace/diego-release
|
||||
# reset to release 0.1099
|
||||
git reset --hard bbdd0d01a2bafb2f7772a0f088262858bccd4620
|
||||
git submodule foreach --recursive git submodule sync && git submodule update --init --recursive
|
||||
git submodule sync --recursive && git submodule foreach --recursive git submodule sync && git submodule update --init --recursive
|
||||
|
||||
# generate manifests
|
||||
echo "director_uuid: __director_uuid__" > /root/workspace/director.yml
|
||||
cd /root/workspace/cf-release
|
||||
./generate_deployment_manifest warden \
|
||||
/root/workspace/director.yml \
|
||||
/root/workspace/diego-release/stubs-for-cf-release/enable_diego_docker_in_cc.yml \
|
||||
/root/workspace/diego-release/stubs-for-cf-release/enable_consul_with_cf.yml \
|
||||
> /root/workspace/cf.yml
|
||||
cd ~/workspace/diego-release
|
||||
./scripts/generate-deployment-manifest \
|
||||
/root/workspace/director.yml \
|
||||
manifest-generation/bosh-lite-stubs/property-overrides.yml \
|
||||
manifest-generation/bosh-lite-stubs/instance-count-overrides.yml \
|
||||
manifest-generation/bosh-lite-stubs/persistent-disk-overrides.yml \
|
||||
manifest-generation/bosh-lite-stubs/iaas-settings.yml \
|
||||
manifest-generation/bosh-lite-stubs/additional-jobs.yml \
|
||||
/root/workspace \
|
||||
> /root/workspace/diego.yml
|
||||
rm /root/workspace/director.yml
|
||||
|
||||
# create cf release file
|
||||
cd /root/workspace/cf-release
|
||||
retry 3 bosh -n create release --force --with-tarball
|
||||
mv dev_releases/cf/cf-207+dev.1.tgz /root/workspace/cf-release.tgz
|
||||
|
||||
# create diego release file
|
||||
cd /root/workspace/diego-release
|
||||
retry 3 bosh -n create release --force --with-tarball
|
||||
mv dev_releases/diego/diego-0.1099.0+dev.1.tgz /root/workspace/diego-release.tgz
|
||||
|
||||
# cleanup
|
||||
rm -rf /root/workspace/cf-release
|
||||
rm -rf /root/workspace/diego-release
|
||||
rm -rf /root/.bosh
|
||||
|
@ -1,81 +0,0 @@
|
||||
# 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.
|
||||
|
||||
Namespaces:
|
||||
=: com.example.paas
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
|
||||
Name: CloudFoundryDiego
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
instance:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $.environment: $.find(std:Environment).require()
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $.environment.reporter.report($this, 'Creating VM for CloudFoundryDiego ')
|
||||
- $securityGroupIngressDiego:
|
||||
- ToPort: 80
|
||||
FromPort: 80
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: 65535
|
||||
FromPort: 1024
|
||||
IpProtocol: tcp
|
||||
External: false
|
||||
- ToPort: 443
|
||||
FromPort: 443
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- $.environment.securityGroupManager.addGroupIngress($securityGroupIngress)
|
||||
- $.instance.deploy()
|
||||
- $resources: new(sys:Resources)
|
||||
|
||||
# Install Bosh
|
||||
- $template: $resources.yaml('InstallBosh.template')
|
||||
- $.environment.reporter.report($this, '[1/5] Installing Bosh...')
|
||||
- $.instance.agent.call($template, $resources, 3600)
|
||||
|
||||
# Upload releases
|
||||
- $template: $resources.yaml('UploadReleases.template')
|
||||
- $.environment.reporter.report($this, '[2/5] Upload releases...')
|
||||
- $.instance.agent.call($template, $resources, 3600)
|
||||
|
||||
# Deploy CF Release
|
||||
- $template: $resources.yaml('DeployCFRelease.template')
|
||||
- $.environment.reporter.report($this, '[3/5] Deploying cf-release...')
|
||||
- $.instance.agent.call($template, $resources, 3600)
|
||||
|
||||
# Deploy Diego Release
|
||||
- $template: $resources.yaml('DeployDiegoRelease.template')
|
||||
- $.environment.reporter.report($this, '[4/5] Deploying diego-release...')
|
||||
- $.instance.agent.call($template, $resources, 3600)
|
||||
|
||||
# Install CLI
|
||||
- $template: $resources.yaml('InstallCLI.template')
|
||||
- $.environment.reporter.report($this, '[5/5] Installing CLI...')
|
||||
- $result: $.instance.agent.call($template, $resources, 600)
|
||||
|
||||
- $.environment.reporter.report($this, 'CloudFoundry Diego is ready')
|
||||
- $.environment.reporter.report($this, $result)
|
||||
- $.setAttr(deployed, true)
|
@ -1,32 +0,0 @@
|
||||
# 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.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Deploy CF Release
|
||||
|
||||
Parameters:
|
||||
appName: $appName
|
||||
|
||||
Body: |
|
||||
return deploy(args.appName).stdout
|
||||
|
||||
Scripts:
|
||||
deploy:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: deployCFRelease.sh
|
||||
Files:
|
||||
- <common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|