Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

End of year updates #76

Merged
merged 7 commits into from
Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .bluemix/deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
{
"type": "text",
"readonly": false,
"title": "(Optional) Cloud Object Storage Bucket Name. Must start and end in alphanumeric characters (from 3 to 63 ) limited to: lowercase, numbers and non-consecutive dots, and hyphens. Leave it empty if you don't want to use Cloud Object Storage.",
"title": "(Optional) Cloud Object Storage Bucket Name. COS allows to use attachments larger than 1MB. The bucket name must start and end in alphanumeric characters (from 3 to 63 ) limited to: lowercase, numbers and non-consecutive dots, and hyphens. Leave it empty if you don't want to use Cloud Object Storage - but you will be limited to 1MB images and videos",
"key": "darkvision-cos-bucket"
},
{
Expand All @@ -164,7 +164,7 @@
{
"type": "password",
"readonly": false,
"title": "(Optional) Cloud Object Storage API key. Leave it empty to create a new service instance.",
"title": "(Optional) Cloud Object Storage API key. Leave it empty to create a new service instance",
"key": "darkvision-cos-api-key"
}
]
Expand Down
15 changes: 10 additions & 5 deletions .bluemix/pipeline-DEPLOY.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ curl -s -X PUT "https://$CLOUDANT_username:$CLOUDANT_password@$CLOUDANT_host/$CL
# Create Watson Visual Recognition service unless WATSON_API_KEY is defined in the service
figlet -f small 'Visual Recognition'
if [ -z "$WATSON_API_KEY" ]; then
bx cf create-service watson_vision_combined lite visualrecognition-for-darkvision
if [ -z "$VISUAL_RECOGNITION_PLAN" ]; then
echo 'VISUAL_RECOGNITION_PLAN was not set in the pipeline. Using default value.'
VISUAL_RECOGNITION_PLAN=lite
fi
bx cf create-service watson_vision_combined $VISUAL_RECOGNITION_PLAN visualrecognition-for-darkvision
bx cf create-service-key visualrecognition-for-darkvision for-darkvision

VISUAL_RECOGNITION_CREDENTIALS=`bx cf service-key visualrecognition-for-darkvision for-darkvision | tail -n +5`
Expand All @@ -75,8 +79,8 @@ bx cf create-service speech_to_text standard speechtotext-for-darkvision
bx cf create-service-key speechtotext-for-darkvision for-darkvision

STT_CREDENTIALS=`bx cf service-key speechtotext-for-darkvision for-darkvision | tail -n +5`
export STT_USERNAME=`echo $STT_CREDENTIALS | jq -r .username`
export STT_PASSWORD=`echo $STT_CREDENTIALS | jq -r .password`
export STT_USERNAME=apikey
export STT_PASSWORD=`echo $STT_CREDENTIALS | jq -r .apikey`
export STT_URL=`echo $STT_CREDENTIALS | jq -r .url`

# Create Watson Natural Language Understanding
Expand All @@ -85,8 +89,8 @@ bx cf create-service natural-language-understanding free nlu-for-darkvision
bx cf create-service-key nlu-for-darkvision for-darkvision

NLU_CREDENTIALS=`bx cf service-key nlu-for-darkvision for-darkvision | tail -n +5`
export NLU_USERNAME=`echo $NLU_CREDENTIALS | jq -r .username`
export NLU_PASSWORD=`echo $NLU_CREDENTIALS | jq -r .password`
export NLU_USERNAME=apikey
export NLU_PASSWORD=`echo $NLU_CREDENTIALS | jq -r .apikey`
export NLU_URL=`echo $NLU_CREDENTIALS | jq -r .url`

# Create Cloud Object Storage service
Expand Down Expand Up @@ -130,6 +134,7 @@ echo 'Speech to Text Cloud Functions action will be accessible at '$STT_CALLBACK

# Deploy the actions
figlet -f small 'Uninstall'
bx wsk list
node deploy.js --uninstall
figlet -f small 'Install'
node deploy.js --install
Expand Down
3 changes: 3 additions & 0 deletions .bluemix/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ stages:
value: "l2fprod/darkvision-extractor-master"
- name: WATSON_API_KEY
value: ${WATSON_API_KEY}
- name: VISUAL_RECOGNITION_PLAN
value: "lite"
- name: STT_CALLBACK_SECRET
value: ASecret{{name}}4Dv
- name: USE_API_CACHE
Expand All @@ -49,6 +51,7 @@ stages:
organization: ${ORG_NAME}
space: ${SPACE_NAME}
application: ${CF_APP_NAME}
api_key: ${IBMCLOUD_API_KEY}
script: |-
#!/bin/bash
./.bluemix/pipeline-DEPLOY.sh
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

## 2018-12-12

* Update calls to Speech to Text and Natural Language Understanding to use `apikey` instead of `username` and `password`.
* Fixed issue in toolchain where Cloud Functions authentication was not set.

## 2018-04-12

* Add support for [IBM Cloud Object Storage](https://console.bluemix.net/catalog/services/cloud-object-storage) for media files.
Expand Down
9 changes: 5 additions & 4 deletions DEPLOY_MANUALLY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

## Create the IBM Cloud Services

***Note***: *if you have existing instances of these services, you don't need to create new instances.
You can simply reuse the existing ones.*
***Note***: *if you have existing instances of these services, you don't need to create new instances. You can simply reuse the existing ones.*

1. Open the IBM Cloud console

Expand All @@ -29,9 +28,11 @@ You can simply reuse the existing ones.*

1. Create a Natural Language Understanding instance named **nlu-for-darkvision**

1. (optional) Create a Cloud Object Storage service instance named **cloudobjectstorage-for-darkvision**
**(Optional) To upload images and videos larger than 1MB, you need to use Cloud Object Storage to store the media files**:

1. (optional) Inside the Cloud Object Storage, create a bucket where the media files will be stored.
1. Create a Cloud Object Storage service instance named **cloudobjectstorage-for-darkvision**

1. Inside the Cloud Object Storage, create a bucket where the media files will be stored.

## Deploy the web interface to upload videos and images

Expand Down