Skip to content
Snippets Groups Projects
Commit b1a1c46a authored by Mark Beierl's avatar Mark Beierl
Browse files

Merge branch 'v8.0'


Change-Id: I96d3bae3abca7b2a5f66bca591b4358d6c921f3d
Signed-off-by: default avatarbeierlm <mark.beierl@canonical.com>
parents 358a7c30 c5233968
No related branches found
No related tags found
No related merge requests found
...@@ -11,18 +11,20 @@ ...@@ -11,18 +11,20 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from charms.layer.caas_base import pod_spec_set import logging
from charms.reactive import endpoint_from_flag import yaml
from charms.reactive import when, when_not, hook
from charms.reactive.flags import set_flag, clear_flag
from charmhelpers.core.hookenv import ( from charmhelpers.core.hookenv import (
log, log,
metadata, metadata,
config, config,
) )
from charms import layer from charms import layer
import yaml from charms.layer.caas_base import pod_spec_set
import logging from charms.reactive import endpoint_from_flag
from charms.reactive import when, when_not, hook
from charms.reactive.flags import set_flag, clear_flag
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
......
../src/charm.py
\ No newline at end of file
../mod/operator/ops
\ No newline at end of file
...@@ -13,11 +13,12 @@ ...@@ -13,11 +13,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import logging
import base64 import base64
from glob import glob
sys.path.append("lib") import logging
from pathlib import Path
from string import Template
import sys
from ops.charm import CharmBase from ops.charm import CharmBase
from ops.framework import StoredState, Object from ops.framework import StoredState, Object
...@@ -30,9 +31,9 @@ from ops.model import ( ...@@ -30,9 +31,9 @@ from ops.model import (
WaitingStatus, WaitingStatus,
) )
from glob import glob
from pathlib import Path sys.path.append("lib")
from string import Template
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -158,6 +159,8 @@ class NGUICharm(CharmBase): ...@@ -158,6 +159,8 @@ class NGUICharm(CharmBase):
} }
) )
logger.debug(files)
spec = { spec = {
"version": 2, "version": 2,
"containers": [ "containers": [
......
../src/charm.py
\ No newline at end of file
../src/charm.py
\ No newline at end of file
../src/charm.py
\ No newline at end of file
../mod/operator/ops
\ No newline at end of file
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys from glob import glob
import logging import logging
from pathlib import Path
sys.path.append("lib") from string import Template
import sys
from ops.charm import CharmBase from ops.charm import CharmBase
from ops.framework import StoredState, Object from ops.framework import StoredState, Object
...@@ -27,9 +28,9 @@ from ops.model import ( ...@@ -27,9 +28,9 @@ from ops.model import (
WaitingStatus, WaitingStatus,
) )
from glob import glob
from pathlib import Path sys.path.append("lib")
from string import Template
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -84,7 +85,7 @@ class PLACharm(CharmBase): ...@@ -84,7 +85,7 @@ class PLACharm(CharmBase):
config = self.framework.model.config config = self.framework.model.config
ports = [ ports = [
{"name": "port", "containerPort": config["port"], "protocol": "TCP",}, {"name": "port", "containerPort": config["port"], "protocol": "TCP", },
] ]
config_spec = { config_spec = {
......
...@@ -261,7 +261,8 @@ function deploy_charmed_osm(){ ...@@ -261,7 +261,8 @@ function deploy_charmed_osm(){
function check_osm_deployed() { function check_osm_deployed() {
TIME_TO_WAIT=600 TIME_TO_WAIT=600
start_time="$(date -u +%s)" start_time="$(date -u +%s)"
total_service_count=14 total_service_count=15
previous_count=0
while true while true
do do
service_count=$(juju status | grep kubernetes | grep active | wc -l) service_count=$(juju status | grep kubernetes | grep active | wc -l)
...@@ -269,6 +270,10 @@ function check_osm_deployed() { ...@@ -269,6 +270,10 @@ function check_osm_deployed() {
if [ $service_count -eq $total_service_count ]; then if [ $service_count -eq $total_service_count ]; then
break break
fi fi
if [ $service_count -ne $previous_count ]; then
previous_count=$service_count
start_time="$(date -u +%s)"
fi
now="$(date -u +%s)" now="$(date -u +%s)"
if [[ $(( now - start_time )) -gt $TIME_TO_WAIT ]];then if [[ $(( now - start_time )) -gt $TIME_TO_WAIT ]];then
echo "Timed out waiting for OSM services to become ready" echo "Timed out waiting for OSM services to become ready"
...@@ -403,14 +408,16 @@ if [ -v MICROSTACK ]; then ...@@ -403,14 +408,16 @@ if [ -v MICROSTACK ]; then
install_microstack install_microstack
fi fi
OSM_HOSTNAME=$(juju config nbi-k8s juju-external-hostname):443
echo "Your installation is now complete, follow these steps for configuring the osmclient:" echo "Your installation is now complete, follow these steps for configuring the osmclient:"
echo echo
echo "1. Create the OSM_HOSTNAME environment variable with the NBI IP" echo "1. Create the OSM_HOSTNAME environment variable with the NBI IP"
echo echo
echo "export OSM_HOSTNAME=nbi.$API_SERVER.xip.io:443" echo "export OSM_HOSTNAME=$OSM_HOSTNAME"
echo echo
echo "2. Add the previous command to your .bashrc for other Shell sessions" echo "2. Add the previous command to your .bashrc for other Shell sessions"
echo echo
echo "echo \"export OSM_HOSTNAME=nbi.$API_SERVER.xip.io:443\" >> ~/.bashrc" echo "echo \"export OSM_HOSTNAME=$OSM_HOSTNAME\" >> ~/.bashrc"
echo echo
echo "DONE" echo "DONE"
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