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

GPII-1833: Adds script to provision non-Vagrant environments #80

Closed
wants to merge 5 commits into from

Conversation

avtar
Copy link
Contributor

@avtar avtar commented Jun 9, 2016

Addresses the following requirement listed on the Ease of Installation, Setup, Build, and Automation page:

A script that reliably does the above steps in a way that is 100% consistent with our continuous integration infrastructure, which can be run:

* On a developer's local machine
* Manually within a bespoke virtual machine (e.g. one that a developer manually set up in VMWare)

@avtar
Copy link
Contributor Author

avtar commented Jun 9, 2016

@amatas, @colinbdclark, @gtirloni these changes have been tested on a Fedora 23 VM. I'll aim to do the same on a physical Fedora machine.

@colinbdclark
Copy link
Member

👏

I'll take a look!

@gpii-bot
Copy link

CI job passed.

@gpii-bot
Copy link

gpii-bot commented Aug 9, 2016

CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details.

@gtirloni
Copy link
Contributor

gtirloni commented Aug 9, 2016

ok to test

@gpii-bot
Copy link

gpii-bot commented Aug 9, 2016

CI job passed.

@avtar
Copy link
Contributor Author

avtar commented Nov 16, 2016

@javihernandez if you have some time could you please review this? Thanks.

@javihernandez javihernandez self-assigned this Nov 25, 2016
README.md Outdated
The next section describes an automated deployment approach that involves using Vagrant. If the GPII Linux Framework needs to be set up on a physical or virtual machine without using Vagrant then the ``install.sh`` script in the ``provisioning`` directory can be used. The script will bootstrap the environment to the point where Ansible roles can be used to set up the Framework. You will need administrative privileges (via sudo) and GNOME 3 set up on Fedora 23 or 24 before using the script:
```
cd provisioning
sudo GPII_FRAMEWORK_DIR=/opt/gpii-linux-framework ./install.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command won't work unless you either "chmod +x install.sh" or call "sh ./install.sh"

@javihernandez
Copy link
Member

Ok, tried this into a freshly installed F24 and got into this error:

TASK [nodejs : Ensure the application user account exists] *********************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "useradd: invalid user name ''\n", "name": "", "rc": 3}
    to retry, use: --limit @/home/gpii/linux/provisioning/playbook.retry
 
PLAY RECAP *********************************************************************
localhost                  : ok=16   changed=7    unreachable=0    failed=1

@amatas
Copy link

amatas commented Jan 16, 2017

Hi guys, could we merge this PR?

@colinbdclark
Copy link
Member

@amatas, do we want to merge it if @javihernandez noticed that an error occurs? Or has this been fixed, or am I just confused?

@avtar
Copy link
Contributor Author

avtar commented Jan 17, 2017

@amatas, @colinbdclark I haven't had a chance to look into the issues that @javihernandez identified. I will be doing so tomorrow afternoon though and will update the PR. Until then these changes shouldn't be merged.

@avtar
Copy link
Contributor Author

avtar commented Jan 18, 2017

@javihernandez I updated this PR with minor documentation changes based on your feedback.

I wasn't able to reproduce the "useradd: invalid user name ''\n" issue :/ Here's what I did to test:

I removed the existing Vagrantfile because I wanted to have a generic Fedora 24 environment to mimic a physical machine:

rm Vagrantfile
vagrant init inclusivedesign/fedora24
vagrant up
vagrant ssh

I copied the git working directory to a non-VirtualBox Shared Folders location due to me being on a Windows 10 host and wanting to avoid any npm symlink issues:

cp -R /vagrant /tmp/vagrant
cd /tmp/vagrant/provisioning

I renamed the /home/vagrant directory to fool our Ansible roles so that they don't think it's a Vagrant VM:

mv /home/vagrant /home/loooool
sudo GPII_FRAMEWORK_DIR=/tmp/vagrant sh install.sh

That results in the script finishing without any errors. I don't have a physical machine to try this on at the moment. Please halp 🆘

@gpii-bot
Copy link

CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details.

@javihernandez
Copy link
Member

Ok, I have repeated the process from the beginning and ended up with the same error.
My environment is a freshly installed Fedora 24 on a virtual machine, nothing else.
Here's the full log: http://pastebin.com/dpDrtc4B
It looks like the command logname is not returning a valid user name. I'm updating the installation just in case, but it can be something in the system that makes logname not behaving well. Will come back with more information.

@javihernandez
Copy link
Member

@avtar,

updating the system solved the issue with logname but I'm not sure whether we want to leave this as it is or provide a fallback solution just in case. What do you think?

Now, I'm facing a new problem, http://pastebin.com/Bi0F390B.
I took a look at the task and could spot several issues but I guess that the main problem here is that at some point we are setting up the user to be vagrant.

Also, I found out that my virtual machine's screen lock now says "Node.js System Account" instead of "gpii". I'd say that we should get rid of this.

@gpii-bot
Copy link

CI job passed.

@gtirloni
Copy link
Contributor

ok to test

@gpii-bot
Copy link

CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details.

@avtar
Copy link
Contributor Author

avtar commented May 23, 2017

The latest changes address feedback from @javihernandez. Do people feel that this wrapper script is still needed? This PR was opened last year when a request was made on the Architecture list for a non-Vagrant provisioning option, it seems now most (all?) people use Vagrant. Thoughts?

@gpii-bot
Copy link

CI job passed.

@avtar
Copy link
Contributor Author

avtar commented May 31, 2017

Closing this PR after confirming the preference for automated Vagrant setups during today's Arch meeting.

@avtar avtar closed this May 31, 2017
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.

None yet

6 participants