Comments (4)
Thanks! A PR would definitely be welcome.
The make-based build process currently updates client_build_hash.txt
, so we'd need to do something else in this case. You could as a final step write {{ __galaxy_current_commit_id }}
to {{ galaxy_static_dir }}/client_build_hash.txt
with a task like:
- name: Write client_build_hash.txt
copy:
content: "{{ __galaxy_current_commit_id }}"
dest: "{{ galaxy_static_dir }}/client_build_hash.txt"
mode: "0644"
from ansible-galaxy.
Yes, that would be even better. To fit with existing naming maybe galaxy_client_use_prebuilt
?
from ansible-galaxy.
Is this being worked on? If not, I would be happy to open a PR. The ability to support the prebuilt client is crucial for us as we are aiming to do cloud deployments of galaxy, and building is slowing down deployment unacceptably long. Optionally using the prebuilt client in ansible would be a great solution!
In fact, I've modified the client.yml
tasks and already got this to work in its most basic form with:
- name: Install prebuilt client via with yarn
yarn:
executable: "yarn --network-timeout 300000 --check-files"
path: "{{ galaxy_server_dir }}"
environment:
PATH: "{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
when: not __galaxy_from_git.stat.exists or (__galaxy_client_build_version != __galaxy_current_commit_id)
- name: Stage prebuilt client
command: "yarn run stage"
args:
chdir: "{{ galaxy_server_dir }}"
environment:
PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
when: "__galaxy_major_version is version('23.0', '>=')"
I noticed that the client_build_hash.txt
does not match the expected git commit value, so currently the role executes these steps every time I run my playbook, but I assume this would be fixed as soon as a new release of the prebuilt client is done?
from ansible-galaxy.
Thanks for the suggestion! Or maybe it makes sense to just skip the entire comparison between commit hashes in case galaxy_use_prebuilt_client
(or some such) is set to true? Instead, we could e.g. use the yarn module to manage the client dependency and run yarn run stage
only when its state changes.
from ansible-galaxy.
Related Issues (20)
- new release HOT 3
- ansible==6 possible tool_config_file incompatibility HOT 1
- Permission problems with SSL private key HOT 1
- Experiences upgrading to 22.05 HOT 5
- Problem to migrate an manual installation to ansible HOT 4
- Ancillary config files are incorrectly configured by default HOT 2
- Undefined variable in `cleanup.yml`
- Run client build before database migration
- Systemd: allow to start after multi-user.target HOT 2
- Why preventing mutable configurations from being overwritten? HOT 1
- chokidar version issue in make client-production-maps HOT 1
- `galaxy-celery-beat.service` fails to start (Galaxy 23) HOT 8
- Reports webapp with gunicorn HOT 5
- Automatic addition of `themes_config_file_by_host: {}` disables themes HOT 1
- Gravity 23.0 handlers skipped
- "galaxy_manage_static is undefined" error
- Confusion about GRAVITY_STATE_DIR
- uwsgi support HOT 1
- Static files are not updated when using `galaxy_manage_subdomain_static` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-galaxy.