-
Notifications
You must be signed in to change notification settings - Fork 9
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
Swift 4.0.2 support, CloudEnv migration and Kubernetes Support #40
base: master
Are you sure you want to change the base?
Conversation
Cloudenv migration and Swift 4.0.2 support (Removed SwiftyJSON). The issue402 branch will have all the changes needed for 4.0.2 and CloudEnv support, and will be merged into master at a later point.
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.
Looks Good!
config.sh
Outdated
cf api https://api.ng.bluemix.net | ||
cf login | ||
cf ic login | ||
bx login --sso -a api.eu-gb.bluemix.net |
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.
--sso applies only to internal users who are using federated ID - fine for our testing purposes, but must be removed.
Is there a reason why eu-gb
is now default?
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.
I would like the api defintion here, and the registry definitions to be dynamic - change it at the top of the file.
config.sh
Outdated
populate-db <imageName> Populates database with initial data | ||
delete <imageName> Delete the group container and deletes created service if possible | ||
delete <imageName> Delete the created service and cluster if possible | ||
all <imageName> Combines all necessary commands to deploy an app to IBM Cloud in a Docker container. |
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.
The help commands need to be updated - all
prompts me for multiple args, and I do not know what the second one is.
There are a couple of changes needed in the Kubernetes scripts.
config.sh
Outdated
@@ -36,31 +38,53 @@ install-tools () { | |||
brew tap cloudfoundry/tap | |||
brew install cf-cli |
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.
Isn't this irrelevant given the bx
cli migration?
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.
We should install bx cli here.
config.sh
Outdated
return | ||
fi | ||
docker build -t $1 --force-rm . | ||
docker build -t registry.eu-gb.bluemix.net/$NAME_SPACE/todolist-couchdb . |
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.
This should be dynamic using the registry definition at the top of the file
config.sh
Outdated
docker tag $1 $REGISTRY_URL/$namespace/$1 | ||
docker push $REGISTRY_URL/$namespace/$1 | ||
bx cr login | ||
docker push registry.eu-gb.bluemix.net/$NAME_SPACE/todolist-couchdb |
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.
This should be dynamic using the registry definition at the top of the file
config.sh
Outdated
cd .. | ||
rm -rf $BRIDGE_APP_NAME | ||
deployContainer () { | ||
kubectl run todo-deployment --image=registry.eu-gb.bluemix.net/$NAME_SPACE/todolist-couchdb |
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.
This should be dynamic using the registry definition at the top of the file
config.sh
Outdated
@@ -36,31 +38,53 @@ install-tools () { | |||
brew tap cloudfoundry/tap | |||
brew install cf-cli | |||
cf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-mac |
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.
Remove?
config.sh
Outdated
@@ -53,7 +53,7 @@ config-cli () { | |||
|
|||
login () { | |||
echo "Setting api and login tools." | |||
bx login --sso -a api.eu-gb.bluemix.net | |||
bx login -a $LOGIN_URL |
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.
One problem with the migration to resource groups is that the Org/Space targeting is no longer interactive.
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.
This can be resolved by adding bx target --cf
below this line.
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.
It is unclear - are imagename and "instance name" the same? They are being used interchangeably.
The script now works end-to-end (tested multiple times), yet there may still be a small issue in the setup function where creating a new cluster takes time to deploy, a wait time of 5 minutes has been placed to account for this but the deployment may not finish in that time and the script could fail as a result. With internal testing, it will also fail if a cluster already exists as only one is allowed per user. The set -e command has been added to end the execution of the script if it fails, however this may need to be removed as the setup function often fails due to the cluster deployment taking too long, or discovering that a cluster already exists. |
Nice Work @ShihabMehboob! A few more points to address:
The script still does not work for me - the export is not functioning as expected. I suspect that it is because the export command is hardcoded to use the par01 data center. Can you validate that this works if you change the endpoint to be one other than One final change:
|
Addressed all the points and tested again, works fine. The region has been changed to US-SOUTH as well now. Amended the export command to get the datacenter from the passed in cluster, and isolated the setup function with a short excerpt in the readme about it being a prerequisite. |
This script does not work for brand new users in its current form - Since this presents a problem, let's do the following:
I have already validated that these commands will work, even if the |
@ShihabMehboob I now see the deployment is now operational, and the app no longer crashes. To access the app, the NodePort must be exposed in order for the IP to be retrieved. i.e. kubectl expose deployment --type=NodePort. This may impact the This should make an end to end test possible - all(), populate(), & delete(). Once this flow is verified, the PR can be merged. |
@ShihabMehboob I heard this was fully working now?! Don't forget to remove the values in |
Aaron Liberatore seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
This PR is instead of the two smaller ones, #37 and #38 , as these two smaller PRs had some code that was shared, especially in the Server side of the application. Passing on Linux on Travis as of this, waiting for Mac to complete building and testing.