Migrate to new NBI charm, and change in NGUI charm

- Fixes bug 1365
- Changes in the installer:
    - use site_url config to expose both NBI and NG-UI
    - use resources for images
- Changes in the NBI: some minor fixes
- Changes in the NG-UI: follow the same pattern as in the new set of
charms

Change-Id: I6a11009ddf9cd22689602b2a53ecf67f376830cb
Signed-off-by: David Garcia <david.garcia@canonical.com>
diff --git a/installers/charm/build.sh b/installers/charm/build.sh
index 1c017ba..edcad53 100755
--- a/installers/charm/build.sh
+++ b/installers/charm/build.sh
@@ -13,8 +13,6 @@
 #     See the License for the specific language governing permissions and
 #     limitations under the License.
 
-set -eux
-
 function build() {
     cd $1 && tox -e build && cd ..
 }
@@ -24,7 +22,17 @@
 build 'nbi-k8s'
 build 'pol-k8s'
 build 'ro-k8s'
-build 'ui-k8s'
-build 'keystone'
-build 'ng-ui'
-build 'pla'
\ No newline at end of file
+# build 'ui-k8s'
+
+charms="nbi pla pol mon lcm ng-ui keystone"
+charms="nbi"
+if [ -z `which charmcraft` ]; then
+    sudo snap install charmcraft --beta
+fi
+
+for charm_directory in $charms; do
+    echo "Building charm $charm_directory..."
+    cd $charm_directory
+    charmcraft build
+    cd ..
+done