Skip to content

Commit

Permalink
Updated with ISPyB checkout to src folder for development and updates…
Browse files Browse the repository at this point in the history
… to readme to document deployment to wildfly
  • Loading branch information
drnasmith committed Aug 21, 2018
1 parent dfcb124 commit 548ad38
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 28 deletions.
6 changes: 5 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ If all goes well the depdendencies will be created for the vagrant user. If not
To build go to /opt/ispyb and run 'mvn package'. This builds the web services, database layer and the ui all bundled into an ear.

## Deploy to Wildfly
TODO: Document correct Auto-deploy steps here...
cp /opt/ispyb/ispyb-ear/target/ispyb.ear /opt/wildfly-10.1.0.Final/standalone/deployments

Then run the wildfly server (the bind makes sure it runs on the external ip address):
cd /opt/wildfly-10.1.0/
./bin/standalone.sh -Djboss.bind.address=192.168.30.11
9 changes: 5 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
# Changed base box to include guest additions (for shared folder)
config.vm.box = "geerlingguy/centos7"

config.vm.provider "virtualbox" do |v|
# Give this more resources
v.memory = 2048
v.cpus = 2
end

config.vm.network "forwarded_port", guest: 3306, host: 3306
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "forwarded_port", guest: 9990, host: 9990
config.vm.network "forwarded_port", guest: 443, host: 443
config.vm.network "private_network", ip: "192.168.30.11"

config.vm.synced_folder "src/", "/opt/src/"

config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbooks/standalone.yml"
end
Expand Down
2 changes: 1 addition & 1 deletion playbooks/group_vars/all/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ispyb_home: /opt/ispyb
ispyb_home: /opt/src/ispyb
ispyb_db_host: localhost
ispyb_db_port: 3306

Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/dbserver/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

# Import the database schemas (ESRF: pydb, DLS: ispyb)
- include_tasks: setup_pydb.yml
- include_tasks: setup_ispyb.yml
#- include_tasks: setup_ispyb.yml
9 changes: 5 additions & 4 deletions playbooks/roles/dbserver/tasks/setup_pydb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
- pyconfig

# Note: for production use, multiple users with privileges would be required
# This setup is just for development only!
- name: Setup ISPyB admin user
mysql_user:
name: "{{ item }}"
name: "{{ispyb_db_user}}"
password: "{{ ispyb_db_password }}"
state: present
host: '%'
priv: '*.*:ALL'
with_items:
- "{{ispyb_db_user}}"

- name: Reload Privilege Tables
command: 'mysql -ne "{{ item }}"'
Expand All @@ -26,7 +25,6 @@

#
# Import database schema
#
#
- name: Import ispyb schema
mysql_db:
Expand All @@ -38,7 +36,10 @@
- pydb
ignore_errors: True

#
# We could run the ahead scripts here if requied...
# If this is commented out it only imports the sql that has been agreed to be included in the pydb schema
#
# - name: Find remote sql update files copied
# find:
# paths: "{{ispyb_home}}/ispyb-ejb/db/scripts/ahead"
Expand Down
1 change: 1 addition & 0 deletions playbooks/roles/webserver/files/roles.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
guest=User
boaty=Manager
17 changes: 1 addition & 16 deletions playbooks/roles/webserver/files/settings.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,13 @@ under the License.
</repositories>
</profile>
-->

<profile>
<id>DLSDEV</id>
<properties>
<ispyb.site>DLSDEV</ispyb.site>
<smis.ws.usr>user</smis.ws.usr>
<smis.ws.pwd>password</smis.ws.pwd>
<ispyb.ws.usr>{{ispyb_db_user}}</ispyb.ws.usr>
<ispyb.ws.pwd>{{ispyb_db_password}}</ispyb.ws.pwd>
<jboss.home>{{wildfly_home}}</jboss.home>

<shipping.container.capacity>16</shipping.container.capacity>
<samplechanger.container.capacity>16</samplechanger.container.capacity>
</properties>
</profile>
</profiles>

<!-- activeProfiles
| List of profiles that are active for all builds.
| -->
<activeProfiles>
<activeProfile>DLSDEV</activeProfile>
<activeProfile>DLS</activeProfile>
</activeProfiles>

</settings>
1 change: 1 addition & 0 deletions playbooks/roles/webserver/files/users.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
guest=guest
boaty=mcboatface
2 changes: 1 addition & 1 deletion playbooks/roles/webserver/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ wildfly_package: wildfly-10.1.0.Final.tar.gz
wildfly_url: "http://download.jboss.org/wildfly/10.1.0.Final/{{wildfly_package}}"
wildfly_home: /opt/wildfly-10.1.0.Final

ispyb_web_user: ispyb
ispyb_web_user: vagrant

maven_local_repo: /home/{{ispyb_web_user}}/.m2
3 changes: 3 additions & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore everything in this directory (links to guest VM)
*
!.gitignore

0 comments on commit 548ad38

Please sign in to comment.