With APEX Connect 2019 taking place in Bonn this week, I thought it would be a good time to share some details of a Vagrant APEX build that I have been working on.
After attending the Norwegian Oracle User Group conference (ougn2019) earlier in the year I was inspired to learn a bit more about Oracle Application Express (APEX).
I have never used Oracle APEX so I thought this would be a good learning opportunity and also provide some great content for some of my presentations later in the year.
After doing a bit of research I decided to build a Vagrant managed VirtualBox VM with Ansible, using Oracle Linux, Oracle 18xe, Oracle REST Data Services (ORDS), and Apache Tomcat.
Having already written a number of Ansible playbooks, the use of the Ansible provider was a simple choice for the automation of the installation and configuration, but this could have also be achieved using bash scripts etc..
Use of Ansible Roles
From experience, I find good approach is to breakdown the steps into roles for different tasks and OS users before I start scripting, this provides a skeleton which I can flesh out as I test the playbook. For my Oracle APEX VM I defined the following roles:
- Install packages
- Configure OS environment
- Install Oracle xe from downloaded RPM
- Configure environment
- Unzip Apex media
- Install and configure Application Express (APEX)
- Unzip JAVA media
- Unzip Tomcat media
- Configure Apache Tomcat
- Unzip Oracle REST Data Services (ORDS) media
- Configure ORDS
- Install ORDS war file
- Start Apache Tomcat
How did I do ?
My target was to deliver a fully built and configured environment that I could access from my Mac without having to do any post-setup configuration steps.
Ok, lets see if Apache Tomcat home page is accessible with – http://oraclexe:8080/
And the health of Apache Tomcat Server with – http://oraclexe:8080/manager/status
Can we we access the Apache Tomcat Virtual Host Manager – http://oraclexe:8080/host-manager/html
And finally lets check we have installed the Oracle REST Data Services (ORDS) using the Apache Tomcat Application Manager – http://oraclexe:8080/manager/html
That all looks good, what about the APEX Admin console – http://oraclexe:8080/ords/apex_admin
And to finish our Application Express tests how about the APEX login screen – http://oraclexe:8080/ords/apex
And to finish off, lets check that my cx_oracle python library is working OK.
[oracle@oraclexe python]$ python connect.py 188.8.131.52.0 [oracle@oraclexe python]$ python query_one.py (10, 'Administration', 200, 1700) (20, 'Marketing', 201, 1800) [oracle@oraclexe python]$ python query.py (10, 'Administration', 200, 1700) (20, 'Marketing', 201, 1800) (30, 'Purchasing', 114, 1700) (40, 'Human Resources', 203, 2400) (50, 'Shipping', 121, 1500) (60, 'IT', 103, 1400) (70, 'Public Relations', 204, 2700) (80, 'Sales', 145, 2500) (90, 'Executive', 100, 1700) (100, 'Finance', 108, 1700) (110, 'Accounting', 205, 1700) (120, 'Treasury', None, 1700) (130, 'Corporate Tax', None, 1700) (140, 'Control And Credit', None, 1700) (150, 'Shareholder Services', None, 1700) (160, 'Benefits', None, 1700) (170, 'Manufacturing', None, 1700) (180, 'Construction', None, 1700) (190, 'Contracting', None, 1700) (200, 'Operations', None, 1700) (210, 'IT Support', None, 1700) (220, 'NOC', None, 1700) (230, 'IT Helpdesk', None, 1700) (240, 'Government Sales', None, 1700) (250, 'Retail Sales', None, 1700) (260, 'Recruiting', None, 1700) (270, 'Payroll', None, 1700)
It’s all looking good, so far…
Over my next few Blogs I will share details of the Vagrant build, Ansible playbook and GitHub details for you to build your own environment.
If you have any feedback, please follow and reach-out to me via Twitter.
Alternatively, if your attending the Finnish Full Stack Developer Conference in May, the Bulgarian Oracle User Group in Sofia in June, or Polish Oracle User Group in September catch me there.
[twitter-follow screen_name=’RonEkins’ show_count=’yes’]