Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling/disabling syn with separate provisioners #165

Closed
wants to merge 1 commit into from

Conversation

dannylamb
Copy link
Member

GitHub Issue: Islandora/documentation#1431

What does this Pull Request do?

Lets you disable Syn for fcrepo on Vagrant builds. Its for demos and such.

What's new?

Two new shell provisioners, for disabling and enabling syn. This uses @bseeger's script here: https://gist.githubusercontent.com/bseeger/90c80d8f71e17ad4283765b2f88afaed/raw/55c82df5200b3a0c62af63d4f4d9845efce161b7/config-syn.sh

How should this be tested?

The provisioners never run unless explictly told to do so. So once you've vagrant up'd successfully, confirm that you can't create a container or upload a file through the Web UI at http://localhost:8080/fcrepo/rest. Then run vagrant provision --provision-with disable-syn. This will disable Syn and restart Tomcat. You can confirm it works by creating a container or uploading a file through Fedora's UI.

Interested parties

@bseeger @dwilcox @Islandora-Devops/committers

@bseeger
Copy link
Member

bseeger commented Feb 11, 2020

I just tried it and it works well for me. Thanks @dannylamb!

@dannylamb
Copy link
Member Author

@seth-shaw-unlv @whikloj Can either of you take a look at this one?

@seth-shaw-unlv
Copy link
Member

I should be able to spin up a box for this in a few minutes.

@seth-shaw-unlv
Copy link
Member

Hmmm... this didn't seem to work for me. I provisioned the box and went the the Fedora web UI and couldn't create a new container. Then I ran the command vagrant provision --provision-with disable-syn it responded with:

==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Running provisioner: disable-syn (shell)...
    default: Running: inline script
    default: sed: can't read /var/lib/tomcat8/conf/tomcat-users.xml: No such file or directory
    default: sed: can't read /var/lib/tomcat8/conf/tomcat-users.xml: No such file or directory
    default: Added user to tomcat-users.xml file.  User: fedoraAdmin  pass: secret3
    default: sed: can't read /var/lib/tomcat8/conf/syn-settings.xml: No such file or directory
    default: Syn valve disabled.
    default: Now restart tomcat with: 'sudo service tomcat8 restart'
    default: Redirecting to /bin/systemctl restart tomcat8.service

The "sed can't read" messages are a bit disconcerting but I attempted to use the Fedora web UI again anyway. However, I still received the "HTTP Status 401 – Unauthorized" message when attempting to create a container.

Then I remembered, at least on a CentOS box (which this is) we have the tomcat configs in /opt/tomcat/conf/ NOT /var/lib/tomcat8/conf/.

@seth-shaw-unlv
Copy link
Member

So, adjusting the variables in the config-syn.sh script allowed corrected the issue. However, we need consistency. Perhaps the initial provision can copy in the script as a template and use the {{ tomcat8_home }} variable? That way the script will be sure to have the right path based on the User's inventory?

@bseeger
Copy link
Member

bseeger commented Feb 14, 2020

Hi @seth-shaw-unlv - yes, great idea. The script was written for default OS, so should probably be adjusted.

@dannylamb
Copy link
Member Author

I can try and template it out in post-install.yml.

@dannylamb
Copy link
Member Author

@dannylamb
Copy link
Member Author

Closing for now, this lives in the iCampAZ branch and we can dust it off next time we need it.

@dannylamb dannylamb closed this Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants