Skip to content
Snippets Groups Projects
Commit ee2c2b61 authored by Austin Cormier's avatar Austin Cormier
Browse files

Pull IMS charm from github during build process to workaround license issue.

parent 3aeed120
No related branches found
No related tags found
No related merge requests found
Showing
with 10 additions and 709 deletions
......@@ -18,6 +18,8 @@ VNFD_BUILD_DIRS := $(addprefix $(VNFD_BUILD_DIR)/, $(VNFDS))
VNFD_PKGS := $(addsuffix .tar.gz, $(VNFDS))
VNFD_BUILD_PKGS := $(addprefix $(VNFD_BUILD_DIR)_pkgs/, $(VNFD_PKGS))
IMS_GITHUB="https://github.com/Metaswitch/clearwater-juju.git"
all: $(VNFD_BUILD_PKGS) ${NSD_BUILD_PKGS}
echo $@
......@@ -29,7 +31,9 @@ $(VNFD_BUILD_DIR)/%: $(VNFD_SRC_DIR)/%
cp -rf $< $(VNFD_BUILD_DIR)
src/gen_vnfd_pkg.sh $< $@
src/generate_descriptor_pkg.sh $(BUILD_DIR)/vnfd_pkgs $@
$(BUILD_DIR)/clearwater-juju: $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf
-cd $(BUILD_DIR) && (test -e clearwater-juju || git clone $(IMS_GITHUB))
$(NSD_BUILD_DIR)/%: $(NSD_SRC_DIR)/%
mkdir -p $(NSD_BUILD_DIR)
......@@ -40,5 +44,9 @@ $(NSD_BUILD_DIR)/%: $(NSD_SRC_DIR)/%
$(BUILD_DIR)/nsd_pkgs/%.tar.gz: $(NSD_BUILD_DIR)/%
src/generate_descriptor_pkg.sh $(BUILD_DIR)/nsd_pkgs $<
$(BUILD_DIR)/vnfd_pkgs/%.tar.gz: $(VNFD_BUILD_DIR)/%
$(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms/clearwater-aio-proxy: $(BUILD_DIR)/clearwater-juju
# Copy the IMS Charm into the IMS vnf package directory before
cp -rf $(BUILD_DIR)/clearwater-juju/charms/trusty/clearwater-aio-proxy $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms
$(BUILD_DIR)/vnfd_pkgs/%.tar.gz: $(VNFD_BUILD_DIR)/% $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms/clearwater-aio-proxy
src/generate_descriptor_pkg.sh $(BUILD_DIR)/vnfd_pkgs $<
# Overview
This is a [Juju charm](https://jujucharms.com/about), which allows configuration of the [Project Clearwater](http://projectclearwater.org) IMS core's [all-in-one](http://clearwater.readthedocs.org/en/stable/All_in_one_Images/index.html) node.
This is a proxy charm, meaning that you must spin up the all-in-one VM first, and then point this charm at it to manage it.
Since the all-in-one node does not support scaling up, neither does this charm.
# Deployment
## Initial deployment
The all-in-one VM image should be downloaded from [http://repo.cw-ngv.com/juju-clearwater-2/cw-aio.ova](http://repo.cw-ngv.com/juju-clearwater-2/cw-aio.ova) and deployed onto your virtualization platform. (You could alternatively try the latest all-in-one VM image from [http://vm-images.cw-ngv.com/](http://vm-images.cw-ngv.com/), but this may not have been tested with this charm - the juju-clearwater-2 version above is known to work.)
The proxy charm should then be deployed, pointing at the all-in-one VM.
# Using the All-in-One Node
Once installed, the all-in-one node will listen for SIP traffic on port 5060 (both TCP and UDP). You can use a standard SIP client (e.g. Blink, Boghe or X-Lite) to register against the all-in-one VM's public IP and make calls.
Our ["Making your first call" documentation](http://clearwater.readthedocs.org/en/latest/Making_your_first_call/index.html) has more information on this process.
# Configuration
- `proxied_ip`: The IP address of the All-in-One node to manage
- `password`: The login password of the All-in-One node to manage (default is
very likely correct)
- `home_domain`: The home domain for this service
- `base_number`: The first number to be allocated in the number range
- `number_count`: The count of numbers to allocate
# Actions
This proxy charm exposes two actions.
- `create-update-user`: Creates a user, or updates if they already exist
- `number`: The number to provision
- `password`: The number's password
- `delete-user`: Deletes a user
- `number`: The number to delete
For example, `juju action do clearwater-aio-proxy/0 create-update-user number=\"1234567890\" password=secret` creates a user. (Note that the escaped double-quotes are required to avoid juju parsing the number as an integer rather than a string.)
Note that the numbers specified in `create-update-user` and `delete-user` actions need not be in the number range specified in the configuration above.
# Contact and Upstream Project Information
Project Clearwater is an open-source IMS core, developed by [Metaswitch Networks](http://www.metaswitch.com) and released under the [GNU GPLv3](http://www.projectclearwater.org/download/license/). You can find more information about it on [our website](http://www.projectclearwater.org/) or [our documentation site](https://clearwater.readthedocs.org).
Clearwater source code and issue list can be found at https://github.com/Metaswitch/.
If you have problems when using Project Clearwater, read [our troubleshooting documentation](http://clearwater.readthedocs.org/en/latest/Troubleshooting_and_Recovery/index.html) for help, or see [our support page](http://clearwater.readthedocs.org/en/latest/Support/index.html) to find out how to ask mailing list questions or raise issues.
create-update-user:
description: Create a user, or update a user if they already exist.
params:
number:
description: The number to provision
type: string
password:
description: The number's password
type: string
required: [number, password]
additionalProperties: false
delete-user:
description: Delete a user. If the user does not exist, this is still considered success.
params:
number:
description: The number to provision
type: string
required: [number]
additionalProperties: false
#!/bin/bash
set -e
# Get the configuration and action parameters.
proxied_ip=$(config-get proxied_ip)
login_password=$(config-get password)
home_domain=$(config-get home_domain)
number=$(action-get number)
password=$(action-get password)
if [ -z "$proxied_ip" ] || [ -z "$login_password" ] || [ -z "$home_domain" ] ; then
echo Proxy not yet configured!
exit 1
fi
# If the user doesn't exist, try to create them. Otherwise, try to update them.
if ! sshpass -p$login_password ssh -o StrictHostKeyChecking=no ubuntu@$proxied_ip "echo $login_password | sudo -S /usr/share/clearwater/bin/display_user $number $home_domain" ; then
echo "Subscriber doesn't exist - creating"
sshpass -p$login_password ssh -o StrictHostKeyChecking=no ubuntu@$proxied_ip "echo $login_password | sudo -S /usr/share/clearwater/bin/create_user $number $home_domain $password"
else
echo "Subscriber exists - updating"
sshpass -p$login_password ssh -o StrictHostKeyChecking=no ubuntu@$proxied_ip "echo $login_password | sudo -S /usr/share/clearwater/bin/update_user $number $home_domain --password $password"
fi
#!/bin/bash
set -e
# Get the configuration and action parameters.
proxied_ip=$(config-get proxied_ip)
login_password=$(config-get password)
home_domain=$(config-get home_domain)
number=$(action-get number)
password=$(action-get password)
if [ -z "$proxied_ip" ] || [ -z "$login_password" ] || [ -z "$home_domain" ] ; then
echo Proxy not yet configured!
exit 1
fi
# Create the user.
sshpass -p$login_password ssh -o StrictHostKeyChecking=no ubuntu@$proxied_ip "echo $login_password | sudo -S /usr/share/clearwater/bin/create_user $number $home_domain $password"
#!/bin/bash
set -e
# Get the configuration and action parameters.
proxied_ip=$(config-get proxied_ip)
login_password=$(config-get password)
home_domain=$(config-get home_domain)
number=$(action-get number)
if [ -z "$proxied_ip" ] || [ -z "$login_password" ] || [ -z "$home_domain" ] ; then
echo Proxy not yet configured!
exit 1
fi
# Delete the user.
sshpass -p$login_password ssh -o StrictHostKeyChecking=no ubuntu@$proxied_ip "echo $login_password | sudo -S /usr/share/clearwater/bin/delete_user -y $number $home_domain"
options:
proxied_ip:
description: The IP address of the All-in-One node to manage
type: string
password:
default: cw-aio
description: The login password of the All-in-One node to manage (default is very likely correct)
type: string
home_domain:
default: example.com
description: The home domain for this service
type: string
base_number:
default: "1230000000"
description: The first number to be allocated in the number range
type: string
number_count:
default: 1000
description: The count of numbers to allocate
type: int
Project Clearwater - IMS in the Cloud
Copyright (C) 2016 Metaswitch Networks Ltd
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version, along with the "Special Exception" for use of
the program along with SSL, set forth below. This program is distributed
in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public
License along with this program. If not, see
<http://www.gnu.org/licenses/>.
The author can be reached by email at clearwater@metaswitch.com or by
post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK
Special Exception
Metaswitch Networks Ltd grants you permission to copy, modify,
propagate, and distribute a work formed by combining OpenSSL with The
Software, or a work derivative of such a combination, even if such
copying, modification, propagation, or distribution would otherwise
violate the terms of the GPL. You must comply with the GPL in all
respects for all of the code used other than OpenSSL.
"OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL
Project and licensed under the OpenSSL Licenses, or a work based on such
software and licensed under the OpenSSL Licenses.
"OpenSSL Licenses" means the OpenSSL License and Original SSLeay License
under which the OpenSSL Project distributes the OpenSSL toolkit software,
as those licenses appear in the file LICENSE-OPENSSL.
#!/bin/bash
set -e
# Get the configuration.
proxied_ip=$(config-get proxied_ip)
login_password=$(config-get password)
home_domain=$(config-get home_domain)
base_number=$(config-get base_number)
number_count=$(config-get number_count)
# If the node is configured, provision it and its numbers.
if [ -n "$proxied_ip" ] && [ -n "$home_domain" ] && [ -n "$login_password" ] ; then
# Copy the reconfigure-aio script on, and run it.
status-set maintenance "configuring"
sshpass -p$login_password scp -o StrictHostKeyChecking=no $CHARM_DIR/lib/reconfigure-aio ubuntu@$proxied_ip:/tmp/reconfigure-aio.$$
sshpass -p$login_password ssh -o StrictHostKeyChecking=no ubuntu@$proxied_ip "echo $login_password | sudo -S bash -c 'bash /tmp/reconfigure-aio.$$ $home_domain $base_number $number_count ; rm -f /tmp/reconfigure-aio.$$'"
status-set active "configured"
else
status-set blocked "waiting for configuration"
fi
#!/bin/bash
set -e
status-set maintenance "installing"
# Install sshpass as we'll need it shortly
apt-get update
apt-get -q -y --force-yes install sshpass
status-set maintenance "installed"
#!/bin/bash
# Here put anything that is needed to start the service.
# Note that currently this is run directly after install
# i.e. 'service apache2 start'
set -e
# Nothing to do
#!/bin/bash
# This will be run when the service is being torn down, allowing you to disable
# it in various ways..
# For example, if your web app uses a text file to signal to the load balancer
# that it is live... you could remove it and sleep for a bit to allow the load
# balancer to stop sending traffic.
# rm /srv/webroot/server-live.txt && sleep 30
set -e
# Nothing to do
#!/bin/bash
# This hook is executed each time a charm is upgraded after the new charm
# contents have been unpacked
# Best practice suggests you execute the hooks/install to ensure all updates are processed -
# hooks/config_change is triggered automatically
set -e
$CHARM_DIR/hooks/install
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="96"
height="96"
id="svg6517"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="icon.svg">
<defs
id="defs6519">
<linearGradient
id="Background">
<stop
id="stop4178"
offset="0"
style="stop-color:#b8b8b8;stop-opacity:1" />
<stop
id="stop4180"
offset="1"
style="stop-color:#c9c9c9;stop-opacity:1" />
</linearGradient>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Inner Shadow"
id="filter1121">
<feFlood
flood-opacity="0.59999999999999998"
flood-color="rgb(0,0,0)"
result="flood"
id="feFlood1123" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="out"
result="composite1"
id="feComposite1125" />
<feGaussianBlur
in="composite1"
stdDeviation="1"
result="blur"
id="feGaussianBlur1127" />
<feOffset
dx="0"
dy="2"
result="offset"
id="feOffset1129" />
<feComposite
in="offset"
in2="SourceGraphic"
operator="atop"
result="composite2"
id="feComposite1131" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow"
id="filter950">
<feFlood
flood-opacity="0.25"
flood-color="rgb(0,0,0)"
result="flood"
id="feFlood952" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite954" />
<feGaussianBlur
in="composite1"
stdDeviation="1"
result="blur"
id="feGaussianBlur956" />
<feOffset
dx="0"
dy="1"
result="offset"
id="feOffset958" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite960" />
</filter>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath873">
<g
transform="matrix(0,-0.66666667,0.66604479,0,-258.25992,677.00001)"
id="g875"
inkscape:label="Layer 1"
style="fill:#ff00ff;fill-opacity:1;stroke:none;display:inline">
<path
style="fill:#ff00ff;fill-opacity:1;stroke:none;display:inline"
d="m 46.702703,898.22775 50.594594,0 C 138.16216,898.22775 144,904.06497 144,944.92583 l 0,50.73846 c 0,40.86071 -5.83784,46.69791 -46.702703,46.69791 l -50.594594,0 C 5.8378378,1042.3622 0,1036.525 0,995.66429 L 0,944.92583 C 0,904.06497 5.8378378,898.22775 46.702703,898.22775 Z"
id="path877"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssssssss" />
</g>
</clipPath>
<filter
inkscape:collect="always"
id="filter891"
inkscape:label="Badge Shadow">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.71999962"
id="feGaussianBlur893" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.3995495"
inkscape:cx="18.514671"
inkscape:cy="49.018169"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1331"
inkscape:window-height="674"
inkscape:window-x="19"
inkscape:window-y="1"
inkscape:window-maximized="0"
showborder="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:showpageshadow="false">
<inkscape:grid
type="xygrid"
id="grid821" />
<sodipodi:guide
orientation="1,0"
position="16,48"
id="guide823" />
<sodipodi:guide
orientation="0,1"
position="64,80"
id="guide825" />
<sodipodi:guide
orientation="1,0"
position="80,40"
id="guide827" />
<sodipodi:guide
orientation="0,1"
position="64,16"
id="guide829" />
</sodipodi:namedview>
<metadata
id="metadata6522">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="BACKGROUND"
inkscape:groupmode="layer"
id="layer1"
transform="translate(268,-635.29076)"
style="display:inline">
<path
style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline;filter:url(#filter1121)"
d="m -268,700.15563 0,-33.72973 c 0,-27.24324 3.88785,-31.13513 31.10302,-31.13513 l 33.79408,0 c 27.21507,0 31.1029,3.89189 31.1029,31.13513 l 0,33.72973 c 0,27.24325 -3.88783,31.13514 -31.1029,31.13514 l -33.79408,0 C -264.11215,731.29077 -268,727.39888 -268,700.15563 Z"
id="path6455"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssssssss" />
<image
y="633.29077"
x="-270"
id="image3169"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABHNCSVQICAgIfAhkiAAAHHpJREFU
eJztnXl8VdXV9797OOcOGQiDiAwmQBFrKYFq1cYhoU7VDlCrrdqnah2w7ePzik8HW2uLtLXt01aB
VmvFvgXU1re2VdAqzgQQnCVQC4oMQeY5ZLrDOWfv949z7iUhAaIkRN83v89nf3KHw7nrrN9ee6+1
9tobYa2lB90H2d0C/P+OHgK6GT0EdDN6COhm9BDQzeghoJvRQ0A3o4eAbkYPAd2MHgK6GT0EdDN6
COhm6I5eKIToSjkOC8NLy1oJt2Z97Qc2w7h/8vNDbwHDS8skoAAXcE/52LD5l17w6apuFeo94ENN
QNTzFZAAiqNWKWDc/lbxQUWHh6APMBRQAPQCMNauEIje3StSx/GBIqBFr92/99oDjOuC0IpjhAQI
a22TlKI8+u4DOxfk0O0EREoXr9XUjInFYuN93yvzfL+sqanpzTkPP/KL6XfcsRPwhpeWmTXra62o
mDgGKAFYb7LLSrdUZwiVrQEn6wVvJGLyM7Ql8QOJbiNgeGmZeG7hwqHFxUWTY7HYF1zHKRFCgIBd
u3YvuPj6H79Us7npRtP/jJFWuUOQarQY1PoegXRZe8xZ4GeQmYal2qTXFqXpe0LMK+VDQoDo6Jpw
Z7mh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O3OcO/393F1t1NrNm0h3Vb9rKidheOVjgy3Jwhpchn86Ja
obrA2OmBMbOev/0rte3dV130q/k28Kvws+FY7+dbHYE/3Voz7YNydOXhDEElwEwOSIIIz3DQzr4W
uXBChc2J/OZ8NlS1zobm1gMgdOGwzAFufPY3X649kFzq4t9MtYE/icDbp/zAq8H3p5v502Z16OGO
IA47Dog8oBtoh4jQf26pfN3Cf3aQKtxSlFAhEYkogIlFK0m53fAI6qTgxoVTL5t1MJnUxb8pwZo9
1vcg8GsIvLmYYJZ58he1HXqobkCnBWK5XfHAeKAKKEFEVqBaWkGOBB2REPb4cDUsVH5uRSxcGxaz
pJA3vnrn1z4QQ0Zno8si4eiQjjFCqjFoXY5yylB6TOuTbx2EUkgZ7gdzwjXhupiU1a5Sc5UQc95r
IPNhwxFPRcjzby5DqrLwQD2dP+tHSoWUsjbz4A217+vGH1K8bwJ60DX4UP8XJv8voIeAbkYPAd2M
HgK6GT0EdDN6COhm9BDQzeghoJvRQ0A3o4eAbkYPAd2MHgK6GT0EdDN6COhm/F8NUqh9Ash0EgAA
AABJRU5ErkJggg==
"
height="96"
width="96"
style="stroke:#000000;stroke-opacity:0.18666669" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="PLACE YOUR PICTOGRAM HERE"
style="display:inline" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="BADGE"
style="display:none"
sodipodi:insensitive="true">
<g
style="display:inline"
transform="translate(-340.00001,-581)"
id="g4394"
clip-path="none">
<g
id="g855">
<g
inkscape:groupmode="maskhelper"
id="g870"
clip-path="url(#clipPath873)"
style="opacity:0.6;filter:url(#filter891)">
<path
transform="matrix(1.4999992,0,0,1.4999992,-29.999795,-237.54282)"
d="m 264,552.36218 c 0,6.62742 -5.37258,12 -12,12 -6.62742,0 -12,-5.37258 -12,-12 0,-6.62741 5.37258,-12 12,-12 6.62742,0 12,5.37259 12,12 z"
sodipodi:ry="12"
sodipodi:rx="12"
sodipodi:cy="552.36218"
sodipodi:cx="252"
id="path844"
style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
</g>
<g
id="g862">
<path
sodipodi:type="arc"
style="color:#000000;fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path4398"
sodipodi:cx="252"
sodipodi:cy="552.36218"
sodipodi:rx="12"
sodipodi:ry="12"
d="m 264,552.36218 c 0,6.62742 -5.37258,12 -12,12 -6.62742,0 -12,-5.37258 -12,-12 0,-6.62741 5.37258,-12 12,-12 6.62742,0 12,5.37259 12,12 z"
transform="matrix(1.4999992,0,0,1.4999992,-29.999795,-238.54282)" />
<path
transform="matrix(1.25,0,0,1.25,33,-100.45273)"
d="m 264,552.36218 c 0,6.62742 -5.37258,12 -12,12 -6.62742,0 -12,-5.37258 -12,-12 0,-6.62741 5.37258,-12 12,-12 6.62742,0 12,5.37259 12,12 z"
sodipodi:ry="12"
sodipodi:rx="12"
sodipodi:cy="552.36218"
sodipodi:cx="252"
id="path4400"
style="color:#000000;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
sodipodi:type="star"
style="color:#000000;fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path4459"
sodipodi:sides="5"
sodipodi:cx="666.19574"
sodipodi:cy="589.50385"
sodipodi:r1="7.2431178"
sodipodi:r2="4.3458705"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.6755161"
inkscape:flatsided="false"
inkscape:rounded="0.1"
inkscape:randomized="0"
d="m 669.8173,595.77657 c -0.39132,0.22593 -3.62645,-1.90343 -4.07583,-1.95066 -0.44938,-0.0472 -4.05653,1.36297 -4.39232,1.06062 -0.3358,-0.30235 0.68963,-4.03715 0.59569,-4.47913 -0.0939,-0.44198 -2.5498,-3.43681 -2.36602,-3.8496 0.18379,-0.41279 4.05267,-0.59166 4.44398,-0.81759 0.39132,-0.22593 2.48067,-3.48704 2.93005,-3.4398 0.44938,0.0472 1.81505,3.67147 2.15084,3.97382 0.3358,0.30236 4.08294,1.2817 4.17689,1.72369 0.0939,0.44198 -2.9309,2.86076 -3.11469,3.27355 -0.18379,0.41279 0.0427,4.27917 -0.34859,4.5051 z"
transform="matrix(1.511423,-0.16366377,0.16366377,1.511423,-755.37346,-191.93651)" />
</g>
</g>
</g>
</g>
</svg>
#!/bin/bash
# Reconfigures an all-in-one image to use a new home domain and number range.
# Usage: reconfigure-aio <home-domain> [<base-number> <number-count>]
# Get command-line arguments.
home_domain=$1
base_number=$2
number_count=$3
if [ -z "$home_domain" ] ; then
echo "Usage: reconfigure-aio <home-domain> [<base-number> <number-count>]"
fi
# Remove all old numbers from the database, unless they're currently assigned.
# We do this even if the home domain hasn't changed, because the number range might have done (and
# it's hard to tell if that's happened, and cheap/low-impact to just do the reprovisioning).
old_home_domain=$(. /etc/clearwater/config ; echo $home_domain)
echo "DELETE FROM ellis.numbers WHERE number LIKE '%@$old_home_domain' AND owner_id IS NULL ;" | mysql
# Update /etc/clearwater/shared_config, if the home domain has changed.
if [ "$home_domain" != "$old_home_domain" ] ; then
function escape { echo $1 | sed -e 's/\//\\\//g' ; }
sed -e 's/^home_domain=.*$/home_domain='$(escape $home_domain)'/g' \
</etc/clearwater/shared_config >/tmp/shared_config.$$
mv /tmp/shared_config.$$ /etc/clearwater/shared_config
# Restart clearwater-infrastructure to propagate changes to other configuration files.
service clearwater-infrastructure restart
fi
# Create new numbers in the new domain, if we've been asked to.
if [ -n "$base_number" ] && [ -n "$number_count" ] ; then
/usr/share/clearwater/ellis/env/bin/python /usr/share/clearwater/ellis/src/metaswitch/ellis/tools/create_numbers.py --start $base_number --count $number_count
fi
# Restart all the components, if the home domain has changed.
if [ "$home_domain" != "$old_home_domain" ] ; then
# Work around https://github.com/Metaswitch/sprout/issues/1296.
service bono stop
# Restart all the processes.
for X in /usr/share/clearwater/infrastructure/scripts/restart/* ; do $X ; done
# Kick monit to wake up and sleep for 10 seconds to make sure it has an accurate view of the system.
monit
sleep 10
# Now wait until all the processes are back up and running (or at least "Uptime failed", which
# means the process is running, just hasn't been running for very long).
while monit summary | grep _process | egrep -v "(Running|Uptime failed)" ; do
echo Some processes still not running - waiting...
sleep 2
done
echo All processes running - configuration complete!
fi
name: clearwater-aio-proxy
summary: All-in-One proxy charm for Project Clearwater
maintainer: Project Clearwater Maintainers <maintainers@projectclearwater.org>
description: All-in-One proxy charm for Project Clearwater
tags:
- misc
subordinate: false
provides:
ue:
interface: 3GPP-Gm
1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment