Upload
others
View
17
Download
0
Embed Size (px)
Citation preview
1
1: ibm-bluemix 2
2
Examples 2
2
IBM Bluemix 2
1 : bluemix 2
2 : Bluemix Cloud Foundry 2
2a : Bluemix 2
2b : Bluemix 3
IBM Bluemix Toolchain GitHub RESTful API (Node.js) 3
1 : GitHub 3
2 : IBM Bluemix 3
3 : GitHub Rest API 4
4 : Toolchain (Continuous Deployment Tool) IBM Bluemix GitHub 4
5 : PostMan API 25
: 25
2: Bluemix 27
27
Examples 27
Bluemix iOS 27
3: 29
Examples 29
VCAP_SERVICES 29
31
You can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: ibm-bluemix
It is an unofficial and free ibm-bluemix ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official ibm-bluemix.
The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners.
Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to [email protected]
https://riptutorial.com/ko/home 1
1: ibm-bluemix Bluemix , , IBM (PaaS) . Bluemix . Java, Node.js, Swift, Go, PHP, Python Ruby .
IBM Bluemix Cloud Foundry . iOS Docker . Bluemix . , VM , .
Bluemix . Dallas, London Sydney Bluemix 100 .
Compute - , Docker , •- VPN •- •- •Watson - •- API , , •DevOps - , , , •- , •- , , , •- , , •Internet of Things - IoT •
Bluemix - •ID - Bluemix FAQ•Bluemix - •Bluemix •Bluemix - US-South , EU-GB , AU-SYD•
Examples
ibm-bluemix .
IBM Bluemix
1 : bluemix
https://console.ng.bluemix.net/registration/ .
30 . ( ).
2 : Bluemix Cloud Foundry
. 1 . CLI https://new-console.ng.bluemix.net/docs/starters/install_cli.html cli cli.
2a : Bluemix
https://riptutorial.com/ko/home 2
$ bluemix api https://api.ng.bluemix.net
2b : Bluemix
$ bluemix login -u username -o org_name -s space_name
1 , org_name space_name .
bluemix . http://clis.ng.bluemix.net/ui/home.html CLI .
IBM Bluemix Toolchain GitHub RESTful API (Node.js)
1 : GitHub
GitHub 2 . .
1.a Github .
1.b , . GitHub .
https://riptutorial.com/ko/home 3
2 : IBM Bluemix
Bluemix Bluemix .
3 : GitHub Rest API
3.a Git Git GUI Git SourceTree . SourceTree SourceTree Tutorial .
3.b git push GitHub Rest API . GitHub Rest API GitHub . : Rest API MongoDB APICache .
4 : Toolchain (Continuous Deployment Tool) IBM Bluemix GitHub
4.a Bluemix .
4.b .
"" .
https://riptutorial.com/ko/home 4
4.n . . Play like .
4.o ToolChain IBM Bluemix RESTful API Continuous Deployment .
https://riptutorial.com/ko/home 24
API .
5 : PostMan API
API Google . . .
:
. .
https://riptutorial.com/ko/home 25
ibm-bluemix : https://riptutorial.com/ko/ibm-bluemix/topic/1110/ibm-bluemix-
https://riptutorial.com/ko/home 26
2: Bluemix IBM Bluemix Mobile Analytics . Mobile Analytics SDK , .
Examples
Bluemix iOS
Bluemix .1. iOS Bluemix Mobile Services SDK .2. SDK AppDelegate.swift import .3.
import BMSCore import BMSAnalytics
didFinishLaunchingWithOptions .
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Set api key, Bluemix region. These are available in the Mobile Analytics console after you create an instance let api_key="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" let bmixRegion=BMSClient.Region.usSouth //Provide a name for your app that will appear in the Mobile Analytics console. let appName="MyAppName" //Initialize Mobile Analytics in your Bluemix region BMSClient.sharedInstance.initialize(bluemixRegion: bmixRegion) Analytics.initialize(appName: appName, apiKey: api_key, hasUserContext: false, deviceEvents: DeviceEvent.LIFECYCLE) //Send analytics //Analytics.send() //Alternately send analytics and log to your xCode console Analytics.send { (response: Response?, error: NSError?) in if response?.statusCode == 201 { print("Successfully sent analytics: \(response?.responseText)") } else { print("Failed to send analytics: \(response?.responseText). Error: \(error?.localizedDescription)") } } return true }
4.
Bluemix Analytics.send() .5.
. .6.
https://riptutorial.com/ko/home 27
Bluemix : https://riptutorial.com/ko/ibm-bluemix/topic/6680/bluemix---
https://riptutorial.com/ko/home 28
3:
Examples
VCAP_SERVICES
VCAP_SERVICES .
JSON .
VCAP_SERVICES
{ "push-reappt": [ { "name": "Reappt from Push Technology", "label": "push_reappt", "plan": "reappt:pushtechnology:free", "credentials": { "principal": "service-binding-abcd1234", "credentials": "XYZlmnop456", "host": "sniffingitchyPythagoras.eu.bluemix.reappt.io", "port": 443 } } ] }
.
.
var reappt_credentials = JSON.parse(process.env.VCAP_SERVICES)["push-reappt"][0].credentials; diffusion.connect({ host : reappt_credentials.host, principal : reappt_credentials.principal, credentials : reappt_credentials.credentials }).then(connected, error);
Java .
private static final JsonParser PARSER = new JsonParser(); private static final JsonObject VCAP_SERVICES = PARSER.parse(System.getenv("VCAP_SERVICES")).getAsJsonObject(); private static final JsonObject REAPPT_CREDENTIALS = VCAP_SERVICES.getAsJsonArray("push-reappt").get(0) .getAsJsonObject().getAsJsonObject("credentials"); protected static final String HOST = REAPPT_CREDENTIALS.getAsJsonPrimitive("host").getAsString(); protected static final String PRINCIPAL = REAPPT_CREDENTIALS.getAsJsonPrimitive("principal").getAsString();
https://riptutorial.com/ko/home 29
protected static final String CREDENTIALS = REAPPT_CREDENTIALS.getAsJsonPrimitive("credentials").getAsString();
: https://riptutorial.com/ko/ibm-bluemix/topic/2542/
https://riptutorial.com/ko/home 30
S. No
Contributors
1 ibm-bluemix ariescamitan, Community, Joshua Smith, ralphearle
2 Bluemix mdarden, Srikanth K M
3 Freddie Coleman
https://riptutorial.com/ko/home 31