Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Remove hard coded username #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fkleon
Copy link
Contributor

@fkleon fkleon commented Nov 17, 2017

GitHub Issue: n/a

What does this Pull Request do?

Within Catalyst we're using a custom base box for our development environments.

The provisoning scripts in this repository assume that CLAW is to be installed
as the ubuntu user, which does not exist on our box.

This PR introduces the variable CLAW_USER through configs/variables,
which is automatically set to the owner of the supplied home directory.

This allows to run the CLAW Vagrant environment with a different base box,
by just changing the home_dir in the Vagrantfile instead of hunting down
all occurrences of the ubuntu user in scripts and config.

What's new?

  • Added CLAW_USER variable to configs/variables that is set to the owner of the supplied home directory
  • Changed installation scripts to use the CLAW_USER variable instead of ubuntu
  • Changed installation scripts to also replace the home directory in configs where required

How should this be tested?

  • Bring up a fresh vagrant environment with vagrant up
  • Ensure the provisioning completes without errors

I've tested these changes against:

  • The newest public ubuntu/xenial64 base box for VirtualBox (v20171116.0.0)
  • Our internal xenial base box for LXC (which is using the vagrant user instead of ubuntu)

Interested parties

@Islandora-CLAW/committers

@whikloj
Copy link
Contributor

whikloj commented Nov 17, 2017

@fkleon this all seems fine, however I will note that we are hoping to deprecate this in favour of https://github.com/Islandora-DevOps/claw-playbook. So I am wondering if you want to continue with this PR or have a look at the ansible playbook and see if similar changes (there might already by a similar PR there) would be better?

@fkleon
Copy link
Contributor Author

fkleon commented Nov 17, 2017

Hi @whikloj - you're right, I'm actually looking at the Ansible playbook as well.

There were some similar issues to sort out, and a few unrelated kinks. I hope to prepare some pull requests for that on Monday. All in all the Ansible provisioner offers a much smoother experience!

However since this Shell provisioner is still supported and the work was already done, I decided to go ahead with this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants