Exploring the Future Potential of AI-Enabled Smartphone Processors
Bgoug 2019.11 building free, open-source, plsql products in cloud
1. Jacek Gębal
twitter: @GebalJacek
mail: jgebal@gmail.com
blog: oraclethoughts.com
Principal Software Engineer
@Fidelity Investments - Ireland
co-author & maintainer of: utPLSQL
Building open-source
with Oracle Database
in the cloud
for FREE!
2. About me
● Software engineer since ~2000 - mainly Oracle database
● Infected with testing and automation since ~2013
● Key contributor, author and maintainer of utPLSQL v3
● Active developer, learner, testing advocate
3. Why this talk
● What I’ve learned with
○ Global, remote, transparent collaboration
○ Great tools available for free for open-source
○ Building maintainable software project
○ Sustainability and long-livity of the project
8. How do you know that my code works?
● Trust the author
● Trust documentation
● Trust other users
● Read & understand all of the code
● Try it
● Try it even more more in depth
9. ● Test all logic (SQL & PL/SQL)
● Automate test execution
● Test early, often, continuously
● Use test language closest to tested language
Testing database code
http://utplsql.org/
https://github.com/utPLSQL/utPLSQL
10. ● What is continuous integration?
● Why it is important?
● Dev-Ops
● Continuous Testing as part of CI
Continuous Integration
11. Why Travis for open-source?
● simple to use
● easy setup and integration with github
● up to 5 concurrent build servers
● 18-40 GB of disk space for your builds
● 4-8 GB RAM
● 2 cores
https://docs.travis-ci.com/user/reference/overview/
Continuous Integration
12. For each configured event on github tavi will
● Initiate a build
● Spin up a new server(s)
● Execute all the steps from .travis.yml file on server(s)
● Verify build status
● Report back build status to github
https://docs.travis-ci.com/user/customizing-the-build/
Travis.org - how it works
16. ● login to travis & enable integration with github
● add .travis.yml file in your project
● put steps into .travis.yml file
https://docs.travis-ci.com/user/tutorial/
Travis setup
17. https://github.com/utPLSQL/utPLSQL-demo-project/blob/develop/.travis.yml
.travis.yml Setup the build server:
- download SQLcl - to work with DB
- download utPLSQL - for testing
- download and start Docker Oracle DB
- install utPLSQL
Install the project:
- Create DB account (user)
- deploy project code
- deploy test code
Verify the project
- Run all tests with utPLSQL
- Run Sonar code analysis
18. ● How to keep your database in a predictable state?
● Using Oracle Always Free Cloud Database as an option?
Consistency is key
20. - read-only image of a machine
- create once - use many times
- images cannot be changed
- change to image = new image
Scripts for Oracle DB Images:
https://github.com/oracle/docker-images
https://github.com/utPLSQL/docker-scripts
Docker Image
21. - a running “machine” started from image
- can be stopped and restarted
- when removed - all the container-specific data is “gone”
- new image can be created
from a running/stopped container
Docker Container
22. - New CI server started on each build
- Docker image of Oracle DB downloaded
- Clean container started
- Code deployed & tested with utPLSQL
CI with Travis & Docker
23. Measuring Code Quality
● Can code quality be measured?
● Preventing security holes
● Preventing potential risks
25. Using Docker locally
Install Docker:
- Toolbox - https://docs.docker.com/toolbox/toolbox_install_windows/
- Desktop - https://docs.docker.com/docker-for-windows/install/
- Four basic commands to control your containers
29. Summary
● Free hosting & versioning of your code
● SDLC, bugtracking, Wiki, Pages
● Continuous Integration servers
● Hosting for Docker images
● Code analysis
● Testing frameworks
● multiple IDEs
All you need to do is put all the pieces of puzzle together
33. ● Readme - intro/getiting started guide
● License - if you want others to take you seriously
● Contributing guide - if you want others to help you
● Badges
So I’ve published my code - then what?
https://github.com/utPLSQL/utPLSQL