-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update to stable/1.7.x #52
Conversation
After artefactual/deploy-pub#52 is merged, we won't be using a a shared folder for code deployment in virtualbox.
Related to #51 |
I think the main reason to put the archivematica code in a synced folder was to allow developers to easily modify the code from the host (which is a big plus for development). If the code is now deployed to /opt/archivematica and this folder is not synced this feature will be lost. |
The problem is that the npm package have problems to install/build. I think this happens because they need a lot of different files, and the vbox driver is not able to handle that in a timely fashion, and that affects all users, developers or not. We should look for other ways to share the source between the host and the vm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to address the changes around synced folders separately. This would mean giving up on deploy-pub as a development workflow - is that what we want? Should we file an issue and consult the team/community beforehand? Perhaps we should have a playbooks/archivematica-development
playbook?
This PR could remain as the changeset suggested to update the branch requirements of the roles and the changes around the indexless feature.
Should the |
This might not be a relevant comment, but does part of the problem come from the need to build the javascript apps with node on the server Archivematica is being deployed to? In the past, the appraisal tab and transfer browser components were built manually using webpack, and so there were fewer build dependencies required during deployment. If the node apps where built and stored in an registry or artifact repository somewhere, would that make the deploy faster and work with fewer dependencies? |
How much faster do you want it to be? I can manually 1) clone the repo, 2) build appraisal-tab and 3) build transfer-browser in about a minute. I've uploaded a little asciinema so you have an idea how fast this stuff got in the last year: https://asciinema.org/a/ibpqExMCCJiQKPwBXWR5kMMJD. Building with yarn seems a tiny bit faster but it's almost unnoticeable. And if we merged transfer-browser and appraisal-tab as a single front-end project then we would cut the build time in half. For some perspective, The problem with the Dashboard front-end build that Santi is trying to fix is only reproducible when you're using VirtualBox + For deployments, deb/rpm packages and our Docker image already bundles the front-end prebuilts. I think that it'd be ok if we continue letting Ansible build all the things from scratch, it makes things simpler for us. |
No. But I think that this could be considered a minor issue iff we used |
The current docs point to the defaults/main.yml, not sure why this case requires to be added in a explicit way |
@sevein we have I think we should use the default value when building from vagrant, and set to "development" when needed. When this "development" mode is enabled, we won't build npm dependencies. What do you think? |
Sounds like a good plan. |
@@ -31,7 +31,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |||
end | |||
|
|||
# Make the project root available to the guest VM | |||
config.vm.synced_folder '.', '/vagrant' | |||
config.vm.synced_folder '.', '/home/vagrant-sync' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC /vagrant
is a default synced folder configured by Vagrant and the original L34 wasn't really needed. I think that what this means is that with your change you would have a new /home/vagrant-sync
but /vagrant
would still be configured automatically. I haven't confirmed it but I have a strong feeling that this is the case.
If you wanted to disable /vagrant
I think that you'd need to add the additional line:
config.vm.synced_folder ".", "/vagrant", disabled: true
In any case, I'd still recommend to submit this as a separate issue/pull-request.
Created artefactual-labs/ansible-archivematica-src#173 to circunvent the issue with vagrant and shared folders |
But you're talking about https://github.com/artefactual-labs/ansible-archivematica-src/tree/qa/1.7.x, right? I mean, in this repo and this PR we only mention the It seems to me, that in order to make it easy for an end user of this repo to deploy AM without indexing, we should have
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the description of the PR? I think that the current description is not describing all the changes that you're making. I just want to make sure that when someone lands into this PR it's easier to see what changes are happening and why.
Also, the development workflow changes considerably, i.e.:
- The developer needs to change the environment type variable (
archivematica_src_environment_type
) todevelopment
, - The developer needs to assign the
/vagrant/src/
value toarchivematica_src_dir
, - The developer needs to run
npm install
manually from the host.
Should this be added to the README?
- name: "Set SELinux to Permissive" | ||
command: "setenforce Permissive" | ||
become: "yes" | ||
- name: "Selinux boolean 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be more descriptive?
e.g. SELinux: allow HTTPD scripts and modules to connect to the network.
Same with the others.
- name: "Selinux seport" | ||
become: "yes" | ||
seport: | ||
ports: 8000,8001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to quote this so it's consistent with our style of writing YAML files? It's definitely a string.
state: "present" | ||
when: ansible_selinux.status == "enabled" | ||
|
||
- name: "Enable epel repository" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/epel/EPEL
501f909
to
5654b00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about these notes for the README in regards to the development workflow? https://gist.github.com/sevein/74f26cf6638ff19276e2808c152faf71
I'm testing a fix for the root cause, adding If it works, I'll push |
ed6de69
to
cf642be
Compare
Tested with trusty, and npm works. Also, a pull request removing the workaround in the archivematica ansible role that should be merged for this to work, has been created at artefactual-labs/ansible-archivematica-src#174 |
@@ -32,7 +32,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |||
end | |||
|
|||
# Make the project root available to the guest VM | |||
config.vm.synced_folder '.', '/vagrant' | |||
config.vm.synced_folder '.', '/vagrant',mount_options: ["uid=333", "gid=333"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace after the comma?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description of the PR is outdated.
My comments have not been addressed yet.
98842f7
to
9f54fb9
Compare
archivematica_src_am_multi_venvs: "true" | ||
archivematica_src_dir: "/opt/archivematica" | ||
archivematica_src_search_enabled: "yes" | ||
# elasticsearch role |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cosmetic change: missing blank line before L13.
@@ -32,7 +32,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |||
end | |||
|
|||
# Make the project root available to the guest VM | |||
config.vm.synced_folder '.', '/vagrant' | |||
config.vm.synced_folder '.', '/vagrant',mount_options: ["uid=333","gid=333"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace after comma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cosmetic: config.vm.synced_folder '.', '/vagrant', mount_options: ["uid=333", "gid=333"]
- name: "Set SELinux to Permissive" | ||
command: "setenforce Permissive" | ||
become: "yes" | ||
- name: "SELinux: Allow nginx connections to gunicorn" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/gunicorn/Gunicorn
|
||
- name: "Enable epel repository" | ||
yum: | ||
- name: "SELinux: Allow nginx to connect to mysql " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- s/mysql/MySQL
- whitespace before
"
playbooks/archivematica/Vagrantfile
Outdated
@@ -31,7 +31,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |||
end | |||
|
|||
# Make the project root available to the guest VM | |||
config.vm.synced_folder '.', '/vagrant' | |||
config.vm.synced_folder '.', '/vagrant',mount_options: ["uid=333","gid=333"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing whitespace after comma.
ac3a55e
to
eb77dab
Compare
This fixes the problems when building npm modules
eb77dab
to
86d70f4
Compare
@sevein I like your proposed additions to the README. I don't want to have to re-remember these things if I have to create a new ansible/vagrant dev deploy again some day. Oops, I didn't realize this had already been merged. Nevermind. |
I'll submit a PR soon! |
This pr brings updates needed for stable/1.7.x deployment