Remove OraclePDBConnector

This patch removes the OraclePDBConnector app from the Murano catalog as
the original development team no longer has the proper resources for
futher support.

Change-Id: Icc00a0d6d040c86ea285f889e18c709a84dfcbc5
This commit is contained in:
Drew Fisher 2017-02-06 07:34:25 -07:00
parent a3719adb38
commit fcbf3c81d5
12 changed files with 0 additions and 592 deletions

View File

@ -1,145 +0,0 @@
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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.oracle.db.muranoPdb
std: io.murano
sys: io.murano.system
Name: OraclePDB
Extends: 'com.example.databases.SqlDatabase'
Properties:
name:
Contract: $.string().notNull()
username:
Contract: $.string()
Usage: Out
database:
Contract: $.string()
Usage: Out
password:
Contract: $.string()
Usage: Out
agent_queue:
Contract: $.string().notNull()
Default: 'static-agent-002-tasks'
Usage: In
agent:
Contract: $.class(sys:StaticAgent)
Usage: InOut
listener:
Contract: $.string()
Default: '1.1.1.1'
Usage: InOut
createDB:
Contract: $.bool()
Default: false
Usage: InOut
Methods:
initialize:
Body:
- $._environment: $.find(std:Environment).require()
deploy:
Body:
- If: not $.getAttr(deployed, false)
Then:
- $._environment.reporter.report($this, 'Oracle PDB')
- $.createAgent()
- $.getListener()
- $._environment.reporter.report($this, 'Listener {0}'.format($.listener))
- If: $.createDB
Then:
- $.createDatabase(database => $.database)
- $.createUser(username => $.username, password => $.password, database => $.database)
- $connection_string: $.getConnectionString(username => $.username, password => $.password)
- $._environment.reporter.report($this, 'Connection String {0}'.format($connection_string))
- $.setAttr(deployed, true)
createAgent:
Body:
- $queue: $._environment.agentListener.queueName()
- $.agent: new(sys:StaticAgent, env => $._environment,
input_queue => $.agent_queue,
response_queue => $queue )
createDatabase:
Arguments:
database:
Contract: $.string().notNull()
Body:
- $._environment.reporter.report($this, 'Creating a DB')
- $resources: new(sys:Resources)
- $command: $resources.yaml('CreatePDB.template').bind(dict(
database => $database
))
- $.agent.call($command, $resources)
getListener:
Body:
- $resources: new(sys:Resources)
- $command: $resources.yaml('GetListener.template')
- $.listener: $.agent.call($command, $resources)
createUser:
Arguments:
username:
Contract: $.string().notNull()
password:
Contract: $.string().notNull()
database:
Contract: $.string().notNull()
Body:
- $.user: $username
- $.password: $password
- $resources: new(sys:Resources)
- $command: $resources.yaml('CreateUser.template').bind(dict(
database => $database,
username => $username,
password => $password
))
- $.agent.call($command, $resources)
assignUser:
Arguments:
username:
Contract: $.string().notNull()
database:
Contract: $.string().notNull()
Body:
- $._environment.reporter.report($this, 'Assigning a user to the DB')
- $resources: new(sys:Resources)
- $command: $resources.yaml('AssignUser.template').bind(dict(
time => 'now'
))
- $.agent.call($command, $resources)
getConnectionString:
Arguments:
username:
Contract: $.string().notNull()
password:
Contract: $.string().notNull()
Body:
- $._environment.reporter.report($this, 'Generating a connection string for the PDB')
- Return: format('{0}/{1}@//{2}/{3}',$.username, $.password, $.listener, $.database)
demo:
Usage: Action
Body:
- $.createDatabase(database => 'demo')
- $.createUser(database => 'demo',
username => 'test',
password => 'DemoTest01')

View File

@ -1,36 +0,0 @@
#
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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: Create Pluggable Database
Parameters:
database: $database
Body: |
return create('"{0}" '.format(args.database)).stdout
Scripts:
create:
Type: Application
Version: 1.0.0
EntryPoint: pdb_create.sh
Files:
- <ora_env.sh>
Options:
captureStdout: true
captureStderr: true

View File

@ -1,38 +0,0 @@
#
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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: Create Database User
Parameters:
database: $database
username: $username
password: $password
Body: |
return create('"{0}" "{1}" "{2}"'.format(args.database, args.username, args.password)).stdout
Scripts:
create:
Type: Application
Version: 1.0.0
EntryPoint: pdb_create_user.sh
Files:
- <ora_env.sh>
Options:
captureStdout: true
captureStderr: true

View File

@ -1,35 +0,0 @@
#
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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 Oracle Listener
Parameters:
appName: $appName
Body: |
return get_listener(args.appName).stdout
Scripts:
get_listener:
Type: Application
Version: 1.0.0
EntryPoint: get_listener.sh
Files:
- <ora_env.sh>
Options:
captureStdout: true
captureStderr: true

View File

@ -1,32 +0,0 @@
#!/bin/bash
#
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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.
#
. ./ora_env.sh
# lsnrctl is the proper way to get the host and port numbers.
# Get the descriptions but only the tcp and tcps descriptions
ip_addrs=$(lsnrctl status | grep 'DESCRIPTION.*PROTOCOL=tcp' | sed 's|.*HOST=\([^)]*\))(PORT=\([^)]*\).*|\1:\2|g')
for addr in $ip_addrs
do
tnsping "$addr" >> /dev/null
if [ $? -eq 0 ]
then
echo "$addr"
break
else
echo "No Listener"
fi
done

View File

@ -1,30 +0,0 @@
#!/bin/bash
#
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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.
#
. /etc/oraenv/ora_env.sh
. /etc/oraenv/orapwd
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/perl/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
# Find site_perl
site_perl=( $(/usr/bin/ls -r "${ORACLE_HOME}/perl/lib/site_perl") )
if [[ $(/usr/bin/uname -p) == 'sparc' ]]; then
export PERL5LIB=${ORACLE_HOME}/perl/lib/site_perl/${site_perl[0]}/sun4-solaris-64int:${ORACLE_HOME}/perl/lib
else
export PERL5LIB=${ORACLE_HOME}/perl/lib/site_perl/${site_perl[0]}/i86pc-solaris-thread-multi-64:${ORACLE_HOME}/perl/lib
fi
export PDBSEED=$ORADATA/pdbseed

View File

@ -1,36 +0,0 @@
#!/bin/bash
#
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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.
#
# Export env variables
. ./ora_env.sh
sql_file="$ORACLE_USER_HOME/pdb_create_$$.sql"
# Create pluggable database
# Open the pluggable database for read-write
cat > "${sql_file}" << EOF
CONNECT / as sysdba;
SET LINESIZE 100;
SET PAGESIZE 50;
CREATE PLUGGABLE DATABASE $1 ADMIN USER $ADMIN_USER IDENTIFIED BY $ADMIN_PWD roles=(CONNECT,DBA) FILE_NAME_CONVERT = ('$PDBSEED', '$ORADATA/$1');
ALTER PLUGGABLE DATABASE $1 OPEN;
EXIT;
EOF
chown oracle:oracle "${sql_file}"
# Execute the sql statements
su - oracle -c ". ~/ora_env.sh && sqlplus /nolog @$sql_file $1"
# remove the sql_file
rm -fv "${sql_file}"

View File

@ -1,58 +0,0 @@
#!/bin/bash
#
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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.
#
. ./ora_env.sh
sql_file="$ORACLE_USER_HOME/pdb_create_user_$$.sql"
# get the address to attach to
lsnr=$("${ORACLE_USER_HOME}/get_listener.sh")
err=$?
if [[ $err -ne 0 ]]
then
echo "${lsnr}";
exit $err
fi
# create user
# grant all privileges
# TODO: privileges to be set based on what the ADMIN user is requesting
# from the client.
cat > "${sql_file}" << EOF
CONNECT $SYSTEM_USER/$SYSTEM_USER_PWD@//$lsnr/$1;
SET LINESIZE 100;
SET PAGESIZE 50;
CREATE USER $2 IDENTIFIED BY "$3";
GRANT ALL PRIVILEGES to $2;
EXIT
EOF
chown oracle:oracle "${sql_file}"
# Run this perl script so that the user information is
# updated properly on all the system meta files.
perl "${ORACLE_HOME}/rdbms/admin/catcon.pl" -n 1 -l "${ORACLE_USER_HOME}" -b pupbld -u "${SYSTEM_USER}/${SYSTEM_USER_PWD}" "${ORACLE_HOME}/sqlplus/admin/pupbld.sql";
# Execute the sql
su - oracle -c " . ~/ora_env.sh && sqlplus /nolog @${sql_file}"
# construct the connection string.
# echo the CONN string
# conn string is <username>/<pass>@//<ip_addr>:<port>/<pdb>
# echo "$2/$3@//$lnsr/$1"
echo "Connection host and port $lsnr"
rm -fv "${sql_file}"

View File

@ -1,79 +0,0 @@
Version: 2
Application:
?:
type: com.oracle.db.muranoPdb.OraclePDB
name: $.appConfiguration.name
database: $.initDatabaseConfiguration.database
username: $.initDatabaseConfiguration.username
password: $.initDatabaseConfiguration.password
createDB: $.initDatabaseConfiguration.createDB
Forms:
- appConfiguration:
fields:
- name: license
type: string
label: License
required: false
hidden: true
initial: 'Oracle-PDB'
description: >-
All Files in this package are copyright 2015 Oracle and/or its
affiliates. All rights reserved.
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.
- name: name
type: string
label: Application Name
initial: 'Oracle-PDB'
description: >-
Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and
underline are allowed
- initDatabaseConfiguration:
fields:
- name: title
type: string
required: false
hidden: true
descriptionTitle: Database Configuration
description: Specify the properties of the database which will be created at Oracle Server
- name: database
type: string
required: true
label: Database name
description: >-
Please, provide database name that is going to be created
- name: username
type: string
required: true
label: Username
description: >-
Please, provide username that is going to be used to connect to the database
- name: password
type: password
required: true
label: Password
descriptionTitle: Password
description: >-
Please, provide password that is going to be used to connect to the database
- name: createDB
type: boolean
initial: false
required: false
label: Create Database on Deploy
description: >-
Enable checkbox to create a database during an environment deployment

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,28 +0,0 @@
#
# Copyright 2015 Oracle and/or its affiliates. All rights reserved.
#
# 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.0
Type: Application
FullName: com.oracle.db.muranoPdb.OraclePDB
Name: Oracle PDB Connector
Description: |
Oracle PDB Connector is a Murano application that provides OpenStack cloud users with means for self-service provisioning of Oracle Database 12c and Oracle Multitenant Pluggable DataBases (PDBs). This is an unsupported technology preview release not intended for use in production environments.
Author: 'Oracle'
Tags: [oracle]
Classes:
com.oracle.db.muranoPdb.OraclePDB: OraclePDB.murano
Require:
com.example.databases:

View File

@ -1,75 +0,0 @@
====================
Oracle PDB Connector
====================
Description
-----------
Oracle PDB Connector is a Murano application that provides OpenStack cloud
users with means for self-service provisioning of Oracle Database 12c and
Oracle Multitenant Pluggable DataBases (PDBs).
This is an unsupported technology preview release not intended for use in
production environments. It is supported on the Juno and Kilo OpenStack
releases.
Instructions
------------
1. You must first install and configure Oracle Database 12c with the Oracle
Multitenant option on Oracle Solaris 11.2.
Create a file ``/etc/oraenv/ora_env.sh`` with read/write permissions for
the ``oracle`` user, and set the following environment variables (with
values appropriate for your installation)::
ORACLE_BASE=/path/to/oracle # The base directory of Oracle database
# installation
ORACLE_HOME=$ORACLE_BASE/<oracle12c directory> # oracle home
ORACLE_SID=<sid> # Oracle System Identifier
ORADATA=/path/to/data # Oracle application directory
# e.g. /u01/app/oracle/oradata
ORACLE_USER_HOME=/home/oracle # Home directory of user oracle
Now create a file ``/etc/oraenv/orapwd``, also with read/write permissions
for the ``oracle`` user, and add the names and passwords for the admin and
system users::
ADMIN_USER=
SYSTEM_USER=
ADMIN_PWD=
SYSTEM_USER_PWD=
2. You will also need the latest Murano agent.
- Download the latest tarball of murano-agent and its dependent packages
on the node where Oracle 12c is running.
- Install each of the package by doing the following::
# tar -zxvf <package>.tar.gz
# cd <package>
# ./setup.py build
# ./setup.py install
- The executable ``muranoagent`` will be made available in ``/usr/bin``.
- Set up the agent by copying the sample configuration file to
``/etc/murano/agent.conf``.
- Edit ``/etc/murano/agent.conf`` and set ``enable_dynamic_result_queue``
to ``True`` in the ``DEFAULT`` section. Set ``input_queue`` with queue
information from the murano engine.
- Start the agent::
# /usr/bin/muranoagent --config-file /etc/murano.conf
3. Install the latest version of the plugin required by this application,
available from PyPI::
# pip install murano.plugins.static-agent
After the plugin is installed, restart the murano engine.