12/8/2016
1
Welcome to the Waitless World
© 2015 IBM Corporation
Constellations on i: Orion, Git, and RPG
Jesse Gorzinski
Business Architect
© 2016 IBM Corporation
2
Git – what is it?
• Linus Torvalds – inventor of Linux wanted a better source control system – so
he wrote one
• Very popular in the open source community and increasingly in enterprises
• Distributed Version Control System
• Some distinctives
• NOT a server! Just a simple executable
• Stores all of its meta data in one .git directory at the root of your
repository
• Very fast !
12/8/2016
2
© 2016 IBM Corporation
3
Snapshots, Not Differences -> Nearly every operation
local -> FAST!!
From https://git-scm.com/book/en/v2/Getting-Started-Git-Basics
Other VCS store deltas from the
original
Git stores full copies (links, compressed)
Everyone has a full repository
Nearly every operation is local
Full redundancy with all other
repositories
© 2016 IBM Corporation
4
Small & Fast!
source: https://git-scm.com/about/small-and-fast
12/8/2016
3
© 2016 IBM Corporation
5
High-level flow
© 2016 IBM Corporation
6
Staging area?
• Before the commit, files get "staged"
• Why?
– Commit only one of several changed files
– Commit only a portion of a changed file!
12/8/2016
4
© 2016 IBM Corporation
7
Hash codes
• All content is check-summed into a SHA-1 hash code
• From then on the file is referred to by that hash code
• Probability of collision is very small ~ # of sand grains on earth
• => the content is tracked so empty directories are not
• Commits are also referred to by a hash code
© 2016 IBM Corporation
8
Branching and Merging
image source= https://git-scm.com/about
12/8/2016
5
© 2016 IBM Corporation
9
Cherry-picking
source: https://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project
© 2016 IBM Corporation
10
Cherry-picking
source: https://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project
12/8/2016
6
© 2016 IBM Corporation
11
Git hooks
• To install a git hook, just put an executable file in the hooks directory
• The name of the file is the hook
• Example, to install a post-receive hook, do this from the .git/hooks directory
(depending on how you created the repository, the hooks directory may need
to be created)
• Then, populate the file with the commands needed
© 2016 IBM Corporation
12
git hooks (https://git-scm.com/docs/githooks)
• applypatch-msg
• pre-applypatch
• post-applypatch
• pre-commit
• prepare-commit-msg
• commit-msg
• post-commit
• pre-rebase
• post-checkout
• post-merge
• pre-push
• pre-receive
• update
• post-receive
• post-update
• push-to-checkout
• pre-auto-gc
• post-rewrite
• rebase
12/8/2016
7
© 2016 IBM Corporation
13
Git hook example
© 2016 IBM Corporation
14
bit.ly/5733sc1-op1 - 5733SC1 instructions
ssh-keygen contained in 5733SC1 IBM Portable Utilities for i5/OS
*BASE & Option 1
$ ssh-keygen$ ls ~/.sshauthorized_keys id_rsa id_rsa.pub known_hosts
ssh-keygen creates necessary files
Copy/paste id_rsa.pub into GitHub/Bitbucket web interface
$ cat ~/.ssh/id_rsa.pubssh-rsa AAAABxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxpomIpqNexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxLUMp4zhi4BqGHIl [email protected]
To communicate with repository via SSH, you need to give them
your public SSH key for password-less authentication.
SSH
12/8/2016
8
© 2016 IBM Corporation
15
Where can I get Git?
• Can download to your PC
• Can add to your Eclipse
• Can use http://github.org right now and have it hosted in the cloud
• this how a lot of open source is developed
• Or ……
• Install it on your IBM i !
• 5733-OPS option 6
• And then install PTF
• Coming soon
• Follow DeveloperWork Page on 5733OPS
© 2016 IBM Corporation
16
Orion
Powerful
Web Editor
- Supports
open source
languages
AND free form
RPG
Zero install – runs in the browser – on any platform –
cheaper, easier than SEU
Compact
Git UI
- Strong git
source
control
support in
elegant and
powerful
single page
layout
Versatile theming – editor can be light, dark – by customization
or importing themes
12/8/2016
9
© 2016 IBM Corporation
17
Free form RPG in Orion!
© 2016 IBM Corporation
18
• Aaron Bartell published an article just recently on Orion/RPG
• He told me that he had the most screen caps in any article he has ever
written
• Detailed scenario of how to develop in RPG using Orion
Industry pundits have already published articles
http://www.mcpressonline.com/rpg/techtip-shoot-for-orion-with-your-rpg.html
12/8/2016
10
© 2016 IBM Corporation
19
Think through the implications of editing RPG in a
browser
• You can now edit RPG on any device that has a browser
• Windows
• Linux
• Mac
• Tablet
• Phone
• Etc.
• It requires no installation per user
© 2016 IBM Corporation
20
Orion - Language Support
• First class editor support for
• JavaScript
• HTML
• CSS
• Basic editing for
• Free form RPG
• Python
• PHP
• C/C++
• Ruby
• Etc.
12/8/2016
11
© 2016 IBM Corporation
21
Orion is actively being developed – key part of IBM’s
strategic BlueMix
© 2016 IBM Corporation
22
Where can I get Orion?
• See https://wiki.eclipse.org/Orion
• Can download to your PC
• Can use http://orionhub.org right now and have it hosted in the
cloud
• Or ……
• Install it on your IBM i !
• 5733-OPS option 8
• And then install PTF
• Coming soon
• Follow DeveloperWork Page on 5733OPS
• Only this version supports free form RPG
12/8/2016
12
© 2016 IBM Corporation
23
RDi and Git
• Eclipse has a free extension to support
Git called EGit
• Anyone with Eclipse can install it from
the Help->Eclipse Marketplace…
• If you have RDi Java Modernization
Edition – it is an optional component
© 2016 IBM Corporation
24
Think through the implications of Orion + Git
Here's a scenario:
Jesse is travelling. He's at the airport and just has a tablet and his
phone. He receives an urgent call from Edmund that there's a
bug in his code and Sam's pay is incorrect. He logs onto Orion,
fixes the bug, and pushes the change back to Git. Back at the
office, Edmund fetches the change from Git into an i Project in
RDi and recompiles the program. Sam's pay is fixed and the
problem didn't have to wait until Jesse returned from his trip.
12/8/2016
13
© 2016 IBM Corporation
25
Edit RPG to change Sam’s pay – original pay 50000.99
© 2016 IBM Corporation
26
Sam’s pay is edited – now 50000.33
12/8/2016
14
© 2016 IBM Corporation
27
Git view to commit the change
© 2016 IBM Corporation
28
Push change using Git
12/8/2016
15
© 2016 IBM Corporation
29
Change is now in the Git repository history
© 2016 IBM Corporation
30
Fetch from Git into RDi
12/8/2016
16
© 2016 IBM Corporation
31
Change made in tablet is now in RDi iProject where it can be built and run!
© 2016 IBM Corporation
32
Demo
12/8/2016
17
Welcome to the Waitless World
© 2015 IBM Corporation
IBM i and BlueMix
Jesse R. Gorzinski, MBA
IBM i Emerging Solutions
Welcome to the Waitless World
© 2015 IBM Corporation
What is BlueMix?
12/8/2016
18
© 2016 IBM Corporation
35
What is CloudFoundry?
https://www.ibm.com/developerworks/cloud/library/cl-bluemixfoundry/
• Open source platform as a service (PaaS) that lets you quickly create and
deploy applications on the cloud.
• It abstracts the underlying infrastructure needed to run a cloud
• Developers and organizations can choose:
– Development Frameworks: Cloud Foundry supports Java™ code,
Spring, Ruby, Node.js, Python, and custom frameworks.
– Application Services: Cloud Foundry offers support for MySQL,
MongoDB, PostgreSQL, Redis, RabbitMQ, and custom services.
– Clouds: Developers and organizations can choose to run Cloud Foundry
in Public, Private, VMWare and OpenStack-based clouds.
© 2016 IBM Corporation
36
What is Bluemix?
https://www.ibm.com/developerworks/cloud/library/cl-bluemixfoundry/
• Bluemix is an implementation of IBM's Open Cloud Architecture, based on
Cloud Foundry
• Enables you to rapidly create, deploy, and manage your cloud applications.
• Because Bluemix is based on Cloud Foundry, you can tap into a growing
ecosystem of runtime frameworks and services, from both IBM and the
community
• Bluemix provides a dashboard for you to create, view, and manage your
applications and services as well as monitor your application's resource usage.
12/8/2016
19
Welcome to the Waitless World
© 2015 IBM Corporation
IBM i and Bluemix –Speaking the same language!
© 2016 IBM Corporation
38
Bluemix runtimes
38
12/8/2016
20
© 2016 IBM Corporation
39
Bluemix runtimes
39
Welcome to the Waitless World
© 2015 IBM Corporation
IBM i and Bluemix – Usage scenarios
12/8/2016
21
© 2016 IBM Corporation
41
How can I use BlueMix with IBM i?
• At a high level, Bluemix offers a complete development and hosting solution.
• This can be broken down into:
– A development environment
– Language runtime
• IBM i is used as the back-end (system of record) at runtime
• So, we have several options for utilizing BlueMix!
© 2016 IBM Corporation
42
Four use cases
Non-Bluemix Bluemix
development
Bluemix
front-end
Bluemix dev
+ front-end
Development
front-end
(Systems of
Engagement)
back-end
(Systems of
Record)
12/8/2016
22
© 2016 IBM Corporation
43
BlueMix development
Non-Bluemix Bluemix
development
Bluemix
front-end
Bluemix dev
+ front-end
Development
front-end
(Systems of
Engagement)
back-end
(Systems of
Record)
© 2016 IBM Corporation
44
BlueMix development
• Develop your application using BlueMix
• When you want to deploy, move code to IBM i
• IBM i runs both the front-end and back-end code
• Advantages:
– Robust development environment of BlueMix
– All code is ultimately deployed and running on IBM i
12/8/2016
23
© 2016 IBM Corporation
45
BlueMix front-end
Non-Bluemix Bluemix
development
Bluemix
front-end
Bluemix dev
+ front-end
Development
front-end
(Systems of
Engagement)
back-end
(Systems of
Record)
© 2016 IBM Corporation
46
BlueMix front-end
• Develop your application on IBM i
• When you want to deploy, move code to BlueMix
• BlueMix runs the front-end, IBM i runs the back-end code
• Advantages:
– No need to manage web server, etc. All handled by BlueMix
– Only IBM i setup needed is XMLSERVICE
12/8/2016
24
© 2016 IBM Corporation
47
BlueMix development and front-end
Non-Bluemix Bluemix
development
Bluemix
front-end
Bluemix dev
+ front-end
Development
front-end
(Systems of
Engagement)
back-end
(Systems of
Record)
© 2016 IBM Corporation
48
BlueMix development and front-end
• Develop your application using BlueMix
• When you want to deploy, move code to IBM i
• IBM i runs both the front-end and back-end code
• Advantages:
– Robust development environment of BlueMix
– No need to manage web server, etc. All handled by BlueMix
– Only IBM i setup needed is XMLSERVICE
12/8/2016
25
© 2016 IBM Corporation
49
How to connect to IBM i from BlueMix
• Four ways (at least)
1. XMLSERVICE
2. MySQL
3. DB2 Connect
4. Web Services
© 2016 IBM Corporation
50
Connect to IBM i via XMLService
• Works for Node.JS, PHP, Python, Ruby
12/8/2016
26
© 2016 IBM Corporation
51
Connect to IBM i with MySQL
• Bluemix languages have connectors for MySQL
• Bluemix services include MySQL
• MySQL server available on IBM i via Zend DBi offering
© 2016 IBM Corporation
52
Connect to IBM i with DB2 Connect (ibm_db/ibm_db2)
• Integrated with services available in Bluemix
• Requires separate licensing
12/8/2016
27
Welcome to the Waitless World
© 2015 IBM Corporation
Eclipse Orion – Gateway to BlueMix?
© 2016 IBM Corporation
54
What is Eclipse Orion?
• Eclipse Orion is a web-based IDE
• Rich git integration
• Soon to be shipped with 5733OPS
12/8/2016
28
© 2016 IBM Corporation
55
Eclipse Orion – Deploy to BlueMix!
• Can develop application in Orion (IBM i, Windows, Linux, other) and deploy to
BlueMix!
• Publicly documented here:
http://www.eclipse.org/community/eclipse_newsletter/2015/april/article2.php
Welcome to the Waitless World
© 2015 IBM Corporation
Thank you!
12/8/2016
29
© 2016 IBM Corporation
5757
This document was developed for IBM offerings in the United States as of the date of publication. IBM may not make these offerings available in
other countries, and the information is subject to change without notice. Consult your local IBM business contact for information on the IBM
offerings available in your area.
Information in this document concerning non-IBM products was obtained from the suppliers of these products or other public sources. Questions
on the capabilities of non-IBM products should be addressed to the suppliers of those products.
IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give
you any license to these patents. Send license inquires, in writing, to IBM Director of Licensing, IBM Corporation, New Castle Drive, Armonk, NY
10504-1785 USA.
All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives
only.
The information contained in this document has not been submitted to any formal IBM test and is provided "AS IS" with no warranties or
guarantees either expressed or implied.
All examples cited or described in this document are presented as illustrations of the manner in which some IBM products can be used and the
results that may be achieved. Actual environmental costs and performance characteristics will vary depending on individual client configurations
and conditions.
IBM Global Financing offerings are provided through IBM Credit Corporation in the United States and other IBM subsidiaries and divisions
worldwide to qualified commercial and government clients. Rates are based on a client's credit rating, financing terms, offering type, equipment
type and options, and may vary by country. Other restrictions may apply. Rates and offerings are subject to change, extension or withdrawal
without notice.
IBM is not responsible for printing errors in this document that result in pricing or information inaccuracies.
All prices shown are IBM's United States suggested list prices and are subject to change without notice; reseller prices may vary.
IBM hardware products are manufactured from new parts, or new and serviceable used parts. Regardless, our warranty terms apply.
Any performance data contained in this document was determined in a controlled environment. Actual results may vary significantly and are
dependent on many factors including system hardware configuration and software design and configuration. Some measurements quoted in this
document may have been made on development-level systems. There is no guarantee these measurements will be the same on generally-
available systems. Some measurements quoted in this document may have been estimated through extrapolation. Users of this document
should verify the applicable data for their specific environment.
Special notices
© 2016 IBM Corporation
5858
IBM, the IBM logo, ibm.com AIX, AIX (logo), AIX 5L, AIX 6 (logo), AS/400, BladeCenter, Blue Gene, ClusterProven, DB2, ESCON, i5/OS, i5/OS (logo), IBM Business
Partner (logo), IntelliStation, LoadLeveler, Lotus, Lotus Notes, Notes, Operating System/400, OS/400, PartnerLink, PartnerWorld, PowerPC, pSeries, Rational, RISC
System/6000, RS/6000, THINK, Tivoli, Tivoli (logo), Tivoli Management Environment, WebSphere, xSeries, z/OS, zSeries, Active Memory, Balanced Warehouse,
CacheFlow, Cool Blue, IBM Systems Director VMControl, pureScale, TurboCore, Chiphopper, Cloudscape, DB2 Universal Database, DS4000, DS6000, DS8000,
EnergyScale, Enterprise Workload Manager, General Parallel File System, , GPFS, HACMP, HACMP/6000, HASM, IBM Systems Director Active Energy Manager,
iSeries, Micro-Partitioning, POWER, PowerExecutive, PowerVM, PowerVM (logo), PowerHA, Power Architecture, Power Everywhere, Power Family, POWER Hypervisor,
Power Systems, Power Systems (logo), Power Systems Software, Power Systems Software (logo), POWER2, POWER3, POWER4, POWER4+, POWER5, POWER5+,
POWER6, POWER6+, POWER7, System i, System p, System p5, System Storage, System z, TME 10, Workload Partitions Manager and X-Architecture are trademarks
or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are
marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at
the time this information was published. Such trademarks may also be registered or common law trademarks in other countries.
A full list of U.S. trademarks owned by IBM may be found at: http://www.ibm.com/legal/copytrade.shtml.
Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or
other countries.
AltiVec is a trademark of Freescale Semiconductor, Inc.
AMD Opteron is a trademark of Advanced Micro Devices, Inc.
InfiniBand, InfiniBand Trade Association and the InfiniBand design marks are trademarks and/or service marks of the InfiniBand Trade Association.
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered
trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency which is now part of the Office of Government Commerce.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Linear Tape-Open, LTO, the LTO Logo, Ultrium, and the Ultrium logo are trademarks of HP, IBM Corp. and Quantum in the U.S. and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries or both.
Microsoft, Windows and the Windows logo are registered trademarks of Microsoft Corporation in the United States, other countries or both.
NetBench is a registered trademark of Ziff Davis Media in the United States, other countries or both.
SPECint, SPECfp, SPECjbb, SPECweb, SPECjAppServer, SPEC OMP, SPECviewperf, SPECapc, SPEChpc, SPECjvm, SPECmail, SPECimap and SPECsfs are
trademarks of the Standard Performance Evaluation Corp (SPEC).
The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
TPC-C and TPC-H are trademarks of the Transaction Performance Processing Council (TPPC).
UNIX is a registered trademark of The Open Group in the United States, other countries or both.
Other company, product and service names may be trademarks or service marks of others.
Special notices (cont.)