# 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.
-from charms.layer.caas_base import pod_spec_set
-from charms.reactive import endpoint_from_flag
-from charms.reactive import when, when_not, hook
-from charms.reactive.flags import set_flag, clear_flag
+import logging
+import yaml
+
from charmhelpers.core.hookenv import (
log,
metadata,
config,
)
from charms import layer
-import yaml
-import logging
+from charms.layer.caas_base import pod_spec_set
+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__)
--- /dev/null
+../src/charm.py
\ No newline at end of file
--- /dev/null
+../mod/operator/ops
\ No newline at end of file
# See the License for the specific language governing permissions and
# limitations under the License.
-import sys
-import logging
import base64
-
-sys.path.append("lib")
+from glob import glob
+import logging
+from pathlib import Path
+from string import Template
+import sys
from ops.charm import CharmBase
from ops.framework import StoredState, Object
WaitingStatus,
)
-from glob import glob
-from pathlib import Path
-from string import Template
+
+sys.path.append("lib")
+
logger = logging.getLogger(__name__)
}
)
+ logger.debug(files)
+
spec = {
"version": 2,
"containers": [
--- /dev/null
+../src/charm.py
\ No newline at end of file
--- /dev/null
+../src/charm.py
\ No newline at end of file
--- /dev/null
+../src/charm.py
\ No newline at end of file
--- /dev/null
+../mod/operator/ops
\ No newline at end of file
# See the License for the specific language governing permissions and
# limitations under the License.
-import sys
+from glob import glob
import logging
-
-sys.path.append("lib")
+from pathlib import Path
+from string import Template
+import sys
from ops.charm import CharmBase
from ops.framework import StoredState, Object
WaitingStatus,
)
-from glob import glob
-from pathlib import Path
-from string import Template
+
+sys.path.append("lib")
+
logger = logging.getLogger(__name__)
config = self.framework.model.config
ports = [
- {"name": "port", "containerPort": config["port"], "protocol": "TCP",},
+ {"name": "port", "containerPort": config["port"], "protocol": "TCP", },
]
config_spec = {
function check_osm_deployed() {
TIME_TO_WAIT=600
start_time="$(date -u +%s)"
- total_service_count=14
+ total_service_count=15
+ previous_count=0
while true
do
service_count=$(juju status | grep kubernetes | grep active | wc -l)
if [ $service_count -eq $total_service_count ]; then
break
fi
+ if [ $service_count -ne $previous_count ]; then
+ previous_count=$service_count
+ start_time="$(date -u +%s)"
+ fi
now="$(date -u +%s)"
if [[ $(( now - start_time )) -gt $TIME_TO_WAIT ]];then
echo "Timed out waiting for OSM services to become ready"
install_microstack
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
echo "1. Create the OSM_HOSTNAME environment variable with the NBI IP"
echo
-echo "export OSM_HOSTNAME=nbi.$API_SERVER.xip.io:443"
+echo "export OSM_HOSTNAME=$OSM_HOSTNAME"
echo
echo "2. Add the previous command to your .bashrc for other Shell sessions"
echo
-echo "echo \"export OSM_HOSTNAME=nbi.$API_SERVER.xip.io:443\" >> ~/.bashrc"
+echo "echo \"export OSM_HOSTNAME=$OSM_HOSTNAME\" >> ~/.bashrc"
echo
echo "DONE"