-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial BOSH Release #1222
Initial BOSH Release #1222
Changes from 24 commits
147f7ee
7bf5856
25a5b18
e029f37
47e315a
0fc42da
0471eb0
3bf80a1
b438de3
0ec5209
d6c2ff6
b006611
21644ef
4d463b5
15ee4c3
0ee1e24
a0dd94b
c269af1
996d076
af4c518
7f97899
fac25ce
918cf2a
a7052f1
9f7698e
9b8c9da
030a912
09b91f1
3fb8605
ff98e31
3c57826
ad541ae
075a806
4ef5ded
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
#!/bin/sh | ||
|
||
# The install script is licensed under the MIT license Glide itself is under. | ||
# See https://github.com/Masterminds/glide/blob/master/LICENSE for more details. | ||
|
||
# To run this script execute: | ||
# `curl https://glide.sh/get | sh` | ||
|
||
PROJECT_NAME="glide" | ||
|
||
# LGOBIN represents the local bin location. This can be either the GOBIN, if set, | ||
# or the GOPATH/bin. | ||
|
||
LGOBIN="" | ||
|
||
verifyGoInstallation() { | ||
GO=$(which go) | ||
if [ "$?" = "1" ]; then | ||
echo "$PROJECT_NAME needs go. Please intall it first." | ||
exit 1 | ||
fi | ||
if [ -z "$GOPATH" ]; then | ||
echo "$PROJECT_NAME needs environment variable "'$GOPATH'". Set it before continue." | ||
exit 1 | ||
fi | ||
if [ -n "$GOBIN" ]; then | ||
if [ ! -d "$GOBIN" ]; then | ||
echo "$GOBIN "'($GOBIN)'" folder not found. Please create it before continue." | ||
exit 1 | ||
fi | ||
LGOBIN="$GOBIN" | ||
else | ||
if [ ! -d "$GOPATH/bin" ]; then | ||
echo "$GOPATH/bin "'($GOPATH/bin)'" folder not found. Please create it before continue." | ||
exit 1 | ||
fi | ||
LGOBIN="$GOPATH/bin" | ||
fi | ||
|
||
} | ||
|
||
initArch() { | ||
ARCH=$(uname -m) | ||
case $ARCH in | ||
armv5*) ARCH="armv5";; | ||
armv6*) ARCH="armv6";; | ||
armv7*) ARCH="armv7";; | ||
aarch64) ARCH="arm64";; | ||
x86) ARCH="386";; | ||
x86_64) ARCH="amd64";; | ||
i686) ARCH="386";; | ||
i386) ARCH="386";; | ||
esac | ||
} | ||
|
||
initOS() { | ||
OS=$(echo `uname`|tr '[:upper:]' '[:lower:]') | ||
|
||
case "$OS" in | ||
# Minimalist GNU for Windows | ||
mingw*) OS='windows';; | ||
esac | ||
} | ||
|
||
downloadFile() { | ||
TAG=$(wget -q -O - https://glide.sh/version) | ||
LATEST_RELEASE_URL="https://api.github.com/repos/Masterminds/$PROJECT_NAME/releases/tags/$TAG" | ||
LATEST_RELEASE_JSON=$(wget -q -O - "$LATEST_RELEASE_URL") | ||
GLIDE_DIST="glide-$TAG-$OS-$ARCH.tar.gz" | ||
# || true forces this command to not catch error if grep does not find anything | ||
DOWNLOAD_URL=$(echo "$LATEST_RELEASE_JSON" | grep 'browser_' | cut -d\" -f4 | grep "$GLIDE_DIST") || true | ||
if [ -z "$DOWNLOAD_URL" ]; then | ||
echo "Sorry, we dont have a dist for your system: $OS $ARCH" | ||
echo "You can ask one here: https://github.com/Masterminds/$PROJECT_NAME/issues" | ||
exit 1 | ||
else | ||
GLIDE_TMP_FILE="/tmp/$GLIDE_DIST" | ||
echo "Downloading $DOWNLOAD_URL" | ||
wget -q -O "$GLIDE_TMP_FILE" "$DOWNLOAD_URL" | ||
fi | ||
} | ||
|
||
installFile() { | ||
GLIDE_TMP="/tmp/$PROJECT_NAME" | ||
mkdir -p "$GLIDE_TMP" | ||
tar xf "$GLIDE_TMP_FILE" -C "$GLIDE_TMP" | ||
GLIDE_TMP_BIN="$GLIDE_TMP/$OS-$ARCH/$PROJECT_NAME" | ||
cp "$GLIDE_TMP_BIN" "$LGOBIN" | ||
} | ||
|
||
bye() { | ||
result=$? | ||
if [ "$result" != "0" ]; then | ||
echo "Fail to install $PROJECT_NAME" | ||
fi | ||
exit $result | ||
} | ||
|
||
testVersion() { | ||
set +e | ||
GLIDE="$(which $PROJECT_NAME)" | ||
if [ "$?" = "1" ]; then | ||
echo "$PROJECT_NAME not found. Did you add "'$LGOBIN'" to your "'$PATH?' | ||
exit 1 | ||
fi | ||
set -e | ||
GLIDE_VERSION=$($PROJECT_NAME -v) | ||
echo "$GLIDE_VERSION installed successfully" | ||
} | ||
|
||
# Execution | ||
|
||
#Stop execution on any error | ||
trap "bye" EXIT | ||
verifyGoInstallation | ||
set -e | ||
initArch | ||
initOS | ||
downloadFile | ||
installFile | ||
testVersion |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
## Deploying the BOSH release | ||
|
||
**Note:** BOSH release is currently experimental. It currently has only been tested in a BOSH Lite environment, any suggestions for improvements to support other BOSH environments are welcome. | ||
|
||
To build and deploy the BOSH release you will require a BOSH director. If you don't have one available follow these instructions to setup BOSH lite [here](https://bosh.io/docs/bosh-lite.html). | ||
The rest of the instruction assume that a BOSH lite environment is being used to deploy the chart. | ||
|
||
|
||
### Deploying in a BOSH lite environment | ||
|
||
1. To upload a cloud-config execute the following: | ||
``` | ||
$ bosh -e vbox update-cloud-config ~/workspace/bosh-deployment/warden/cloud-config.yml | ||
``` | ||
|
||
2. Upload a stemcell (using the `bosh-warden-boshlite-ubuntu-trusty`) | ||
``` | ||
bosh -e vbox upload-stemcell https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-trusty-go_agent?v=3421.9 \ | ||
--sha1 1396d7877204e630b9e77ae680f492d26607461d | ||
``` | ||
|
||
3. Build the Stratos UI BOSH release | ||
``` | ||
$ bosh create-release | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to be in the stratots-ui-release folder - need to add this to the instructions. |
||
``` | ||
|
||
If you have outstanding changes locally add the `--force` flag. | ||
|
||
4. After a successful build, upload the release to your director. | ||
``` | ||
$ bosh -e vbox upload-release -d stratos-ui | ||
``` | ||
|
||
5. Deploy the release | ||
A sample bosh-lite deployment manifest has been provided in `bosh-lite/deployment.yaml`. The following will use that command to deploy the Console. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your formatting foes weird in this section. sub-sections (a) and (b) aren't indented. |
||
|
||
a. Provide UAA settings in the deployment manifest if known. In the following some sample values have been provided. | ||
``` | ||
uaa_address: https://my-uaa:8080 | ||
console_admin_scope: cloud_controller.admin | ||
console_uaa_client: cf | ||
``` | ||
|
||
b. Select the database you want to use. The Stratos UI Console can be deployed using a MySQL/MariaDB store or SQLite. The followign are sample values for a mysql configuration. This assumes a MySQL server has been deployed locally on the host. | ||
``` | ||
use_mysql: true | ||
use_sqlite: false | ||
mysql_user: stratos | ||
mysql_admin_user: root | ||
mysql_admin_password: changeme | ||
mysql_user_password: strat0s | ||
mysql_db: stratos-db | ||
mysql_host: 127.0.0.1 | ||
mysql_port: 3306 | ||
|
||
``` | ||
|
||
To use SQLite, use the following and comment out the mysql parameters. | ||
``` | ||
# use_mysql: true | ||
use_sqlite: true | ||
# mysql_user: stratos | ||
# mysql_admin_user: root | ||
# mysql_admin_password: changeme | ||
# mysql_user_password: strat0s | ||
# mysql_db: stratos-db | ||
# mysql_host: 127.0.0.1 | ||
# mysql_port: 3306 | ||
|
||
``` | ||
|
||
To deploy you deployment manifest execute the following. | ||
|
||
``` | ||
$ bosh -e vbox -d stratos-ui deploy bosh-lite/deployment.yml | ||
``` | ||
|
||
6. List deployment | ||
|
||
List deployment to get the IP address of the frontend to access the Console. In the following example to access the Console the address is `https://10.0.16.4`. | ||
|
||
``` | ||
09:10 $ bosh -e vbox -d stratos-ui instances | ||
Using environment '192.168.50.6' as client 'admin' | ||
|
||
Task 22. Done | ||
|
||
Deployment 'stratos-ui' | ||
|
||
Instance Process State AZ IPs | ||
backend/68580d76-a241-4de2-b246-82d0a184c9bb running - 10.0.16.103 | ||
frontend/477c94ef-3138-416c-97d7-c09682e6d5dd running - 10.0.16.4 | ||
|
||
2 instances | ||
|
||
Succeeded | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"'chart" should be "console"