Let your project's plumbing up to date.
See Installation
See Contributing
Manala recipes
Home Page: https://manala.github.io/manala-recipes
Let your project's plumbing up to date.
See Installation
See Contributing
Use json
/tmp
on vagrant ?Hey :)
Since manala/ansible-roles#548 I'm trying your new skeleton (manala and manala-recipes) but I'm facing an issue when installing or configuring Redis.
I selected redis: *
when running the recipe, and this is what happens when running VERBOSE=true DIFF=true make setup
(full logs here):
TASK [manala.roles.redis : install > Packages] *********************************
task path: /home/vagrant/.ansible/collections/ansible_collections/manala/roles/roles/redis/tasks/install.yml:3
ok: [development] => {
"cache_update_time": 1616832579,
"cache_updated": false,
"changed": false,
"invocation": {
"module_args": {
"allow_unauthenticated": false,
"autoclean": false,
"autoremove": false,
"cache_valid_time": 3600,
"deb": null,
"default_release": null,
"dpkg_options": "force-confdef,force-confold",
"force": false,
"force_apt_get": false,
"install_recommends": false,
"name": [
"redis-server"
],
"only_upgrade": false,
"package": [
"redis-server"
],
"policy_rc_d": null,
"purge": false,
"state": "present",
"update_cache": true,
"upgrade": null
}
}
}
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/commands/command.py
Pipelining is enabled.
<development> ESTABLISH LOCAL CONNECTION FOR USER: vagrant
<development> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-rhvcjwuaqajrpnnkvkoszccxfvlfbsxj ; /usr/bin/python3'"'"' && sleep 0'
TASK [manala.roles.redis : install > Version] **********************************
task path: /home/vagrant/.ansible/collections/ansible_collections/manala/roles/roles/redis/tasks/install.yml:11
ok: [development] => {
"changed": false,
"cmd": [
"redis-server",
"--version"
],
"delta": "0:00:00.003139",
"end": "2021-03-27 08:19:40.213918",
"invocation": {
"module_args": {
"_raw_params": "redis-server --version",
"_uses_shell": false,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"rc": 0,
"start": "2021-03-27 08:19:40.210779",
"stderr": "",
"stderr_lines": [],
"stdout": "Redis server v=5.0.3 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=1b271fe49834c463",
"stdout_lines": [
"Redis server v=5.0.3 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=1b271fe49834c463"
]
}
TASK [manala.roles.redis : install > Version] **********************************
task path: /home/vagrant/.ansible/collections/ansible_collections/manala/roles/roles/redis/tasks/install.yml:15
ok: [development] => {
"ansible_facts": {
"manala_redis_version": "5.0"
},
"changed": false
}
<development> ESTABLISH LOCAL CONNECTION FOR USER: vagrant
<development> EXEC /bin/sh -c 'echo ~vagrant && sleep 0'
<development> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp `"&& mkdir "` echo /home/vagrant/.ansible/tmp/ansible-tmp-1616833180.28-370-1236859768861 `" && echo ansible-tmp-1616833180.28-370-1236859768861="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1616833180.28-370-1236859768861 `" ) && sleep 0'
<development> EXEC /bin/sh -c 'rm -f -r /home/vagrant/.ansible/tmp/ansible-tmp-1616833180.28-370-1236859768861/ > /dev/null 2>&1 && sleep 0'
TASK [manala.roles.redis : config > Server - Template] *************************
task path: /home/vagrant/.ansible/collections/ansible_collections/manala/roles/roles/redis/tasks/config.yml:3
fatal: [development]: FAILED! => {
"changed": false,
"msg": "AnsibleError: Unexpected templating type error occurred on ({#- Deprecated -#}\n\n{%- set template_env = 'dev' -%}\n{%- include '_base.j2' -%}\n): 'NoneType' object is not iterable"
}
PLAY RECAP *********************************************************************
development : ok=84 changed=1 unreachable=0 failed=1 skipped=73 rescued=0 ignored=0
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
make: *** [.manala/Makefile:32 : setup] Erreur 1
My configuration files:
.manala.yml
:####################################################################
# !!! REMINDER !!! #
# Don't forget to run `manala up` each time you update this file ! #
####################################################################
manala:
recipe: elao.app
##########
# System #
##########
system:
version: 10
hostname: localhost.symfony-app-template.fr
nginx:
configs:
# Php fpm
- file: app_php_fpm
template: configs/app_php_fpm.dev.j2
# Gzip
- file: app_gzip
template: configs/app_gzip.dev.j2
# App
- file: app.conf
config:
- server:
- listen: 443 ssl
- listen: 4430 ssl
- listen: 4431 ssl
- server_name: ~.
- root: /srv/app/public
- access_log: /srv/log/nginx.access.log
- error_log: /srv/log/nginx.error.log
- ssl_certificate: /srv/app/var/localhost.symfony-app-template.fr+1.pem
- ssl_certificate_key: /srv/app/var/localhost.symfony-app-template.fr+1-key.pem
- include: conf.d/app_gzip
- location /:
- try_files: $uri /index.php$is_args$args
- location ~ ^/index\.php(/|$):
- include: conf.d/app_php_fpm
- set: $APP_ENV dev
- if ( $server_port = 4430 ):
- set: $APP_ENV test
- if ( $server_port = 4431 ):
- set: $APP_ENV prod
- fastcgi_param: APP_ENV $APP_ENV
- internal;
php:
version: 7.4
extensions:
# Symfony
- intl
- curl
- mbstring
- xml
# App
- mysql
- pgsql
configs:
- file: app_opcache.ini
template: configs/app_opcache.dev.j2
- file: app.ini
template: configs/app.dev.j2
config:
- date.timezone: UTC
nodejs:
version: 12
mariadb:
version: 10.5
redis:
version: '*'
files:
# Single symfony app
# ------------------
- path: /srv/app/var/log
src: /srv/log
state: link_directory
force: true
- path: /srv/app/var/cache
src: /srv/cache
state: link_directory
force: true
# ssh:
# client:
# config:
# - Host *.elao.run:
# - User: app
# - ForwardAgent: true
.manala/ansible/inventories/system.yml
:system:
hosts:
###############
# Development #
###############
development:
# Ansible
ansible_connection: local
ansible_python_interpreter: /usr/bin/python3
# Accounts
manala_accounts_enabled: true
# Motd
manala_motd_enabled: true
# Timezone
manala_timezone_enabled: true
# Locales
manala_locales_enabled: true
# Zsh
manala_zsh_enabled: true
# Environment
manala_environment_enabled: true
# Apt
manala_apt_enabled: true
manala_apt_packages:
- xz-utils
- rsync
- wget
- curl
- make
- less
- ssl-cert
- htop
- pv # for real-time progress on streams (e.g mysql import)
# Ssh
manala_ssh_enabled: true
manala_ssh_client_config_template: config/client/default.dev.j2
# Git
manala_git_enabled: true
# Oh my zsh
manala_ohmyzsh_enabled: true
# Vim
manala_vim_enabled: true
# Alternatives
manala_alternatives_enabled: true
# Files
manala_files_enabled: true
# NodeJS
manala_nodejs_enabled: true
# Npm
manala_npm_enabled: false
# Php
manala_php_enabled: true
# Nginx
manala_nginx_enabled: true
# Supervisor
manala_supervisor_enabled: false
# Ngrok
manala_ngrok_enabled: true
# Java
manala_java_enabled: false
# Cron
manala_cron_enabled: false
# MySQL / MariaDB
manala_mysql_enabled: true
# Redis
manala_redis_enabled: true
# Elasticsearch
manala_elasticsearch_enabled: false
# InfluxDB
manala_influxdb_enabled: false
# Docker
manala_docker_enabled: false # TODO: to fix
# Gomplate
manala_gomplate_enabled: true
###############
# Integration #
###############
integration:
# Ansible
ansible_connection: local
ansible_python_interpreter: /usr/bin/python3
# Apt
manala_apt_enabled: true
manala_apt_packages:
- xz-utils
- rsync
- wget
- curl
- make
- less
- ssl-cert
- procps
- vim-tiny
# Ssh
manala_ssh_enabled: true
manala_ssh_server: false
manala_ssh_client_config_template: config/client/default.test.j2
# Git
manala_git_enabled: true
# NodeJS
manala_nodejs_enabled: true
# Npm
manala_npm_enabled: false
# Php
manala_php_enabled: true
manala_php_sapis:
- cli
vars:
#######
# All #
#######
# Accounts
manala_accounts_groups:
- group: docker
system: true
manala_accounts_users:
- user: vagrant
group: vagrant
groups: ['docker']
# Motd
manala_motd_scripts_exclusive: true
manala_motd_scripts:
- file: 10-motd
template: motd/elao.j2
message:
- A curl vaillant, rien d'impossible !
- --force et owner !
- Il n'y pas de question cron, juste des réponses mal timé ! — Cronfucius
# Timezone
manala_timezone_default: Etc/UTC
# Locales
manala_locales_codes_default: C.UTF-8
# Environment
manala_environment_files:
- zsh
manala_environment_variables:
COMPOSER_MEMORY_LIMIT: -1
# Apt
manala_apt:
update: true
manala_apt_configs:
- file: archive
template: configs/check_valid_until_false.j2
state: "{{ (ansible_distribution_release in ['jessie']) | ternary('present', 'absent') }}"
manala_apt_repositories_exclusive: true
manala_apt_preferences_exclusive: true
manala_apt_preferences:
- ansible@ansible
- preference: python-backports.ssl-match-hostname@manala
state: "{{ (ansible_distribution_release in ['jessie']) | ternary('present', 'absent') }}"
- preference: python-docker@manala
state: "{{ (ansible_distribution_release in ['jessie']) | ternary('present', 'absent') }}"
- preference: python-httplib2@manala
state: "{{ (ansible_distribution_release in ['jessie']) | ternary('present', 'absent') }}"
- preference: python-ipaddress@manala
state: "{{ (ansible_distribution_release in ['jessie']) | ternary('present', 'absent') }}"
- preference: python-jinja2@manala
state: "{{ (ansible_distribution_release in ['jessie']) | ternary('present', 'absent') }}"
- preference: python-websocket@manala
state: "{{ (ansible_distribution_release in ['jessie']) | ternary('present', 'absent') }}"
- preference: htop@backports
state: "{{ (ansible_distribution_release in ['jessie']) | ternary('present', 'absent') }}"
- preference: docker@docker
state: "{{ (manala_docker_enabled) | ternary('present', 'absent') }}"
- preference: git@backports
state: "{{ (manala_git_enabled and (ansible_distribution_release in ['jessie', 'stretch'])) | ternary('present', 'absent') }}"
- preference: supervisor@{{ (ansible_distribution_release in ['jessie']) | ternary('manala', 'backports') }}
state: "{{ (manala_supervisor_enabled and (ansible_distribution_release in ['jessie', 'stretch'])) | ternary('present', 'absent') }}"
- preference: php@sury_php
state: "{{ (manala_php_enabled) | ternary('present', 'absent') }}"
- preference: nginx@nginx
state: "{{ (manala_nginx_enabled) | ternary('present', 'absent') }}"
- preference: nodejs@nodesource_12
state: "{{ (manala_nodejs_enabled) | ternary('present', 'absent') }}"
- preference: yarn@yarn
state: "{{ (manala_yarn_enabled) | ternary('present', 'absent') }}"
- preference: mysql@default
state: absent
- preference: mariadb@mariadb_10_5
state: present
- preference: redis@{{ (ansible_distribution_release in ['stretch']) | ternary('backports', 'default') }}
state: "{{ (manala_redis_enabled and (ansible_distribution_release in ['stretch'])) | ternary('present', 'absent') }}"
- preference: elasticsearch@default
state: "{{ (manala_elasticsearch_enabled) | ternary('present', 'absent') }}"
- preference: influxdb@default
state: "{{ (manala_influxdb_enabled) | ternary('present', 'absent') }}"
# Ssh
manala_ssh_server_config_template: config/server/default.dev.j2
manala_ssh_server_config:
- AcceptEnv: WORKDIR
manala_ssh_known_hosts:
- github.com
- git.elao.com
# Git
manala_git_config_template: config/default.dev.j2
# Oh my zsh
manala_ohmyzsh_users:
- user: vagrant
group: vagrant
template: users/php.dev.j2
config:
- "[ -d ${WORKDIR:-/srv/app} ] && cd ${WORKDIR:-/srv/app}"
# Vim
manala_vim_config_template: config/default.dev.j2
# Alternatives
manala_alternatives_selections:
- selection: editor
path: /usr/bin/vim.basic
# Files
manala_files_attributes_defaults:
- parents: true
force: true
- path: "^/srv/log"
user: vagrant
group: vagrant
- path: "^/srv/cache"
user: vagrant
group: vagrant
- path: "^/srv/sessions"
user: vagrant
group: vagrant
manala_files_attributes:
- path: /srv/log
state: directory
- path: /srv/cache
state: directory
- path: /srv/sessions
state: directory
- path: /usr/share/nginx/html/404.html
template: nginx/html/404.html.j2
mode: "0644"
# App
- force: true
path: /srv/app/var/log
src: /srv/log
state: link_directory
- force: true
path: /srv/app/var/cache
src: /srv/cache
state: link_directory
# Yarn
manala_yarn_enabled: "{{ manala_nodejs_enabled }}"
# Php
manala_php_version: 7.4
manala_php_sapis_exclusive: true
manala_php_fpm_pools_exclusive: true
manala_php_fpm_pools:
- file: app.conf
template: fpm_pools/app.dev.j2
config:
- app:
- user: vagrant
- group: vagrant
- php_admin_value[error_log]: /srv/log/php.error.log
manala_php_extensions_exclusive: true
manala_php_extensions:
- opcache
- readline
- extension: json
state: "{{ 'present' if (manala_php_version and manala_php_version|string is version('8.0', '<')) else 'ignore' }}"
- extension: xdebug
enabled: false
# App
- intl
- curl
- mbstring
- xml
- mysql
- pgsql
manala_php_configs_exclusive: true
manala_php_configs:
- file: 50-xdebug.ini
template: configs/xdebug.dev.j2
# App
- file: app_opcache.ini
template: configs/app_opcache.dev.j2
- config:
- date.timezone: UTC
file: app.ini
template: configs/app.dev.j2
# Composer
manala_composer_enabled: "{{ manala_php_enabled }}"
# Symfony Cli
manala_symfony_cli_enabled: "{{ manala_php_enabled }}"
# Nginx
manala_nginx_config_template: config/http.dev.j2
manala_nginx_configs_exclusive: true
manala_nginx_configs:
- file: default.conf
config:
- server:
- listen: '* default_server'
- error_page: '404 /404.html'
- location /404.html:
- root: /usr/share/nginx/html
- internal;
# App
- file: app_php_fpm
template: configs/app_php_fpm.dev.j2
- file: app_gzip
template: configs/app_gzip.dev.j2
- config:
- server:
- listen: 443 ssl
- listen: 4430 ssl
- listen: 4431 ssl
- server_name: ~.
- root: /srv/app/public
- access_log: /srv/log/nginx.access.log
- error_log: /srv/log/nginx.error.log
- ssl_certificate: /srv/app/var/localhost.symfony-app-template.fr+1.pem
- ssl_certificate_key: /srv/app/var/localhost.symfony-app-template.fr+1-key.pem
- include: conf.d/app_gzip
- location /:
- try_files: $uri /index.php$is_args$args
- location ~ ^/index\.php(/|$):
- include: conf.d/app_php_fpm
- set: $APP_ENV dev
- if ( $server_port = 4430 ):
- set: $APP_ENV test
- if ( $server_port = 4431 ):
- set: $APP_ENV prod
- fastcgi_param: APP_ENV $APP_ENV
- internal;
file: app.conf
# Supervisor
manala_supervisor_config_template: config/debian/supervisord.conf.j2
manala_supervisor_configs_exclusive: true
manala_supervisor_configs_defaults:
template: supervisor/app.conf.j2
manala_supervisor_configs:
- template: configs/inet_http_server.conf.j2
config:
port: "*:9001"
# Ngrok
manala_ngrok_configs_exclusive: true
manala_ngrok_configs:
- file: config.yml
template: configs/default.dev.j2
# Java
manala_java_version: "{{
{
'jessie': '8',
'stretch': '8',
'buster': '11',
}[ansible_distribution_release]
}}"
# Cron
manala_cron_files_defaults:
user: vagrant
# MySQL / MariaDB
manala_mysql_configs_dir: /etc/mysql/mariadb.conf.d
manala_mysql_configs:
- template: mysql/zz-mysqld.cnf.j2
manala_mysql_users:
# Create a password-less/any-host root user...
- name: root
password: ~
host: "%"
priv: "*.*:ALL,GRANT"
# ...then remove anonymous localhost user (MySQL 5.6)
- name: ''
host: localhost
state: absent
# ...then remove root localhost user (socket based authentication on MySQL 5.7+/MariaDB)
- name: root
host: localhost
state: absent
manala_mysql_install_packages:
- mariadb-server
- mariadb-client
# Redis
manala_redis_config_template: config/default.dev.j2
# Elasticsearch
# Docker
manala_docker_containers:
- name: mailhog
image: mailhog/mailhog:v1.0.1
state: started
restart_policy: unless-stopped
ports:
- 25:1025
- 8025:8025
- name: phpmyadmin
image: phpmyadmin/phpmyadmin
state: started
restart_policy: unless-stopped
env:
PMA_USER: root
# Default docker host ip
PMA_HOST: 172.17.0.1
UPLOAD_LIMIT: 64M
ports:
- 1979:80
- name: phpredisadmin
image: erikdubbelboer/phpredisadmin
state: started
restart_policy: unless-stopped
env:
# Default docker host ip
REDIS_1_HOST: 172.17.0.1
ports:
- 1981:80
This is surely related to manala/ansible-roles#515 but I don't really know what to do.
Do you know what happens? Thanks!
If you try to access the app through http within the container with your-app.ela.ooo it works, but only with http. With https the certificate is invalid (or unknown/untrusted ?).
Fixed by executing this inside the container :
sudo cp ./.manala/certificates/ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
I tried to use a mysql fixtures cache that dump the database and reload it between each tests in order to speed up fixtures loading. This cache use mysqldump
to dump the database, which is available in the VM but not in the CI.
Y'aurais moyen d'avoir un Lazy.None : qui contient juste un debian par defaut ? Pas de nginx, rien.
Cas d'usage : ça me permet de simuler une fresh install de debian sur laquelle j'éxécute mon provisionning ansible custom pour mon serveur dédié.
Use -
to generate automatic Makefile sections
Before
Makefile
---------
## Do foo stuff
foo:
...
## Do bar stuff
bar:
...
$ make help
------------
App:
foo: Do foo stuff
bar: Do bar stuff
After
Makefile
---------
## Foo - Do stuff
foo:
...
## Bar - Do stuff
bar:
...
$ make help
------------
App - Foo:
foo: Do stuff
App - Bar:
bar: Do stuff
Un make setup
qui pop le container et make install/build
serait de la plus grand aide :)
When performing a make release@staging
for instance, if it's the first time since a while, the docker container will be entirely built, which can take some times.
Improving this time is another issue, but having no feedback on the process is frustrating and can let the user think it will hanging on forever.
Hey :)
I've finally be able to provison my VM by disabling Redis and Docker, but I faced an issue when running make ssh
(and every command in SSH):
➜ symfony-app-template git:(upgrade-manala-skeleton) ✗ make ssh
llllllll
llllllll @
llllllll
eeeeeee llllllll aaaaaaaa aaaaaa
eeeeeeeeeeee llllllll aaaaaaaaaaaaaaaaaa @
eeeeeeeeeeeeeee llllllll aaaaaaaaaaaaaaaaaaa @
eeeee eeeee llllllll aaaaaaa aaaaaaa o oooooo
eeeeeeeeeeeeeeeee llllllll aaaaaa aaaaaa oo oooooooooooo
eeeeeeeeeeeeeeeee llllllll aaaaaa aaaaaa oooooooooooo oooo
eeeee llllllll aaaaaaa aaaaaaa oooooooooooooooooo
eeeee eeeeee llllllll aaaaaaaaaaaaaaaaaaa oo oooooooooooo
eeeeeeeeeeeeeee llllllll aaaaaaaaaaaaaaaaaa o oooooo
eeeeeeeeeee llllllll aaaaaaaa aaaaaa ///////////
Gloup gloup
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "fr_FR.UTF-8",
LC_ADDRESS = "fr_FR.UTF-8",
LC_NAME = "fr_FR.UTF-8",
LC_MONETARY = "fr_FR.UTF-8",
LC_PAPER = "fr_FR.UTF-8",
LC_IDENTIFICATION = "fr_FR.UTF-8",
LC_TELEPHONE = "fr_FR.UTF-8",
LC_MEASUREMENT = "fr_FR.UTF-8",
LC_TIME = "fr_FR.UTF-8",
LC_NUMERIC = "fr_FR.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "fr_FR.UTF-8",
LC_ADDRESS = "fr_FR.UTF-8",
LC_NAME = "fr_FR.UTF-8",
LC_MONETARY = "fr_FR.UTF-8",
LC_PAPER = "fr_FR.UTF-8",
LC_IDENTIFICATION = "fr_FR.UTF-8",
LC_TELEPHONE = "fr_FR.UTF-8",
LC_MEASUREMENT = "fr_FR.UTF-8",
LC_TIME = "fr_FR.UTF-8",
LC_NUMERIC = "fr_FR.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
‣ SHOW PUBLIC IP
manala_ip
‣ ENABLE/DISABLE PHP XDEBUG
manala_php_xdebug [on|off]
‣ ENABLE/DISABLE NGINX TIMEOUT
manala_nginx_timeout [on|off]
‣ START NGROK HTTP
manala_ngrok_http
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "fr_FR.UTF-8",
LC_ADDRESS = "fr_FR.UTF-8",
LC_NAME = "fr_FR.UTF-8",
LC_MONETARY = "fr_FR.UTF-8",
LC_PAPER = "fr_FR.UTF-8",
LC_IDENTIFICATION = "fr_FR.UTF-8",
LC_TELEPHONE = "fr_FR.UTF-8",
LC_MEASUREMENT = "fr_FR.UTF-8",
LC_TIME = "fr_FR.UTF-8",
LC_NUMERIC = "fr_FR.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
Do you know what can happens?
Thanks!
make security.foo
(or make audit.foo
) automatically generated, based on presence of:
composer.lock
for symfonyyarn.lock
for yarnpackage-lock.json
for npmNo more such targets in project makefiles :)
Dans docker-compose.yaml.tmpl
on boucle sur les plugins ES définit dans la config pour générer une commande d'install pour chacun d'entre eux. Il faudrait faire également une command d'uninstall si un plugin est installé mais non présent dans la config.
$.Vars.system.elasticsearch.plugins
et elasticsearch-plugin list
elasticsearch-plugin remove {{ $plugin }}
pour chaque plugin absent de la config
- générer un CA dans un repertoire .manala/certificate s(c’est celui la qu’on va mettre dans les navigateurs) un petit fichier NOTES.md ou je ne sais quoi pour expliquer comment on a fait et surtout que c’est QUE pour du dev
- utiliser le module ansible openssl-certificate-module dans le playbook de provisionning, option “ownca", on lui fait manger le CA : il crache un certif avec comme domaines ceux de la vm
*.prout.vm
ETprout.vm
- on rajoute l’offloading par défaut dans nginx
- Une bafouille dans le README :)
- Ajouter le CA à osX
Since we're not able to sync files out of the .manala
directory on manala up
and since it might not be expected to systematically update the Github workflows (i might be tweaked for the project specificities), we could perhaps imagine a make manala.workflows
target that'll copy Github workflows from the .manala/github
directory to the .github/workflows
one, on-demand.
The the developer can simply check the diff and choose what to commit.
We may encounter some issues with the current structure:
README.md
file, not inside a dedicated yaml
file representing the workflow.README.md
. Some like release.yaml
and deploy.yaml
could be split. But some like integration workflows are dynamically generated (one per integration.github.jobs
entry)Is there a way to dynamically generate the workflows into dedicated files so we can simply copy them on-demand?
For more perfs whenever:
Instead, setup the deps (PHP, Node) directly on the Github Runner.
ANSIBLE_PYTHON_INTERPRETER="/usr/bin/python"
Use the same cat method (introduced here #88) in all existing templates.
To test it, just launch the resulting script in both linux AND osx.
Expose the project path on the host to the app container as an env var,
so we can exploit this to leverage the Symfony IDE config with directory mapping.
+ forward the SYMFONY_IDE
env var from the host for a standard usage on every projects (https://symfony.com/blog/new-in-symfony-6-1-profiler-improvements-part-2#better-code-editor-selection) ?
It's been a while since I'm not using Ngrok anymore, since it's now too much limited using the free plan.
Instead a simple:
## Run HTTP proxy to expose a public URL for the API
proxy.api: SHELL := $(or $(DOCKER_SHELL),$(SHELL))
proxy.api:
npx localtunnel --local-host=my-app.ela.ooo --port 80
is enough
Currently, the release task creates a commit message referencing the original repo, so you can retrieve which is the last commit from the original repo that was included in the release.
But there is nothing the other way around: on the original repo, there is no easy way to know which release repo commit was linked to the history.
Given we often create release, then deploy and then create a Github Release,
having an empty commit with a message linking to the release repository commit (or giving the hash),
would allow me to easily know from a Github Release which is the corresponding commit on the repo release
(hence allowing to easily revert to a previous version for instance).
As an alternative, we could call a dedicated Github Worklow when creating a Github Release,
that would push the same tag to the release repository.
But that would only work for prod workflows, since we don't create Github Release for staging ones.
Also, it does not account for mono-repo with multiples apps with different versions inside.
So both could be good to have in a same flow.
Aka. 'make up`
What about a jenkins parameter to manually trigger a build AND don't kill the container ?
We could find a way to easily log into this container for debug purposes.
A ttl (2 hours ?) should also be set into the container to let it kill itself.
An idea of @hyvs
Docker containers
- name: mongo-express
image: mongo-express
state: absent
restart_policy: unless-stopped
#env:
# Default docker host ip
# host.docker.internal ?
# gateway.docker.internal ?
# REDIS_1_HOST: 172.17.0.1
ports:
- 1981:80
It would be great if we can configure the task of the integration to fail without stopping the pipeline
For exemple, we can check phpstan but not breaking the build even if the phpstan task fail
Something like this:
tasks:
- shell: make install@integration
allowFailure: true
make docker exec elasticsearch sh
.manala/Makefile:77: warning: overriding commands for target `sh’
.manala/Makefile:64: warning: ignoring old commands for target `sh’
When accessing my web application, I'm facing a 502 bad gateway.
This is the logs:
⇒ sudo cat /srv/log/nginx.error.log
2021/04/01 19:30:42 [crit] 25261#25261: *1 connect() to unix:/run/php-fpm.app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.28.128.1, server: ~., request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.app.sock:", host: "localhost.symfony-app-template.fr:4430", referrer: "https://github.com/"
2021/04/01 19:30:46 [crit] 25261#25261: *3 connect() to unix:/run/php-fpm.app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.28.128.1, server: ~., request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.app.sock:", host: "localhost.symfony-app-template.fr:4431", referrer: "https://github.com/"
2021/04/01 19:30:46 [crit] 25261#25261: *4 connect() to unix:/run/php-fpm.app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.28.128.1, server: ~., request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.app.sock:", host: "localhost.symfony-app-template.fr", referrer: "https://github.com/"
2021/04/01 19:30:46 [crit] 25261#25261: *1 connect() to unix:/run/php-fpm.app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.28.128.1, server: ~., request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.app.sock:", host: "localhost.symfony-app-template.fr:4430", referrer: "https://localhost.symfony-app-template.fr:4430/"
2021/04/01 19:30:46 [crit] 25261#25261: *3 connect() to unix:/run/php-fpm.app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.28.128.1, server: ~., request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.app.sock:", host: "localhost.symfony-app-template.fr:4431", referrer: "https://localhost.symfony-app-template.fr:4431/"
2021/04/01 19:30:46 [crit] 25261#25261: *4 connect() to unix:/run/php-fpm.app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.28.128.1, server: ~., request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.app.sock:", host: "localhost.symfony-app-template.fr", referrer: "https://localhost.symfony-app-template.fr/"
But for me, the PHP-FPM pool configuration is correct:
The problem is there is no file /run/php-fpm.app.sock
. :(
If I run systemctl status php7.4-fpm.service
, everything looks fine:
❱Development❰ vagrant@localhost:/srv/app|upgrade-manala-skeleton⚡
⇒
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor pres
Active: active (running) since Thu 2021-04-01 19:07:40 UTC; 24min ago
Docs: man:php-fpm7.4(8)
Main PID: 24172 (php-fpm7.4)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/s
Tasks: 3 (limit: 3592)
Memory: 15.3M
CGroup: /system.slice/php7.4-fpm.service
├─24172 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
├─24173 php-fpm: pool www
└─24174 php-fpm: pool www
I restarted php7.4-fpm-service
and the file /run/php-fpm.app.sock
is now present, no more 502 Bad Gateway.
Did you know what happens?
Thanks!
Maintenant que le Vagrantfile est dans .manala, vagrant box update
n'est plus possible à la racine du projet et il ne me
semble pas avoir de proxy dans le makefile manala. La seule solution que j'ai trouvé c'est d'exécuter vagrant box update
depuis le répertoire .manala
.
In osx, no file permissions issues, but what about on linux when both root
& docker
user will access to the same file ?
ANSIBLE_STDOUT_CALLBACK="skippy"
-> ANSIBLE_DISPLAY_SKIPPED_HOSTS="0"
exec
) needs project name be passed by environment variable COMPOSE_PROJECT_NAME
instead of parameter --project-name
. Fill upstream issue.Jenkinsfile
path in jenkins config (two step move, this is the second one :) )XDG_CACHE_HOME
default value from /srv/.cache/
to /srv/cache
in jenkins cloud configmake sh
make docker [PARAMS]
command
make docker logs -f
-> make docker logs -- -f
trickhttps://
in url commit description on github actionzsh
/oh-my-zsh
to native bash
and starshipN: Skipping acquire of configured file 'mysql-5.7/binary-arm64/Packages' as repository 'http://repo.mysql.com/apt/debian stretch InRelease' doesn't support architecture 'arm64'
(see: 4bee100)N: Skipping acquire of configured file 'nginx/binary-arm64/Packages' as repository 'http://nginx.org/packages/debian stretch InRelease' doesn't support architecture 'arm64'
(see: 4fd94fc)up --wait
development: Errors were encountered while processing:
development: grub-pc
development: E
development: :
development: Sub-process /usr/bin/dpkg returned an error code (1)
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
Actuellement on ne peut configurer de release que pour deux environnement "staging" et "production".
Je voudrais configurer une release vers un 3ème environnement "beta" (par exemple), j'aurais donc :
Mais il ne me laisse pas faire car les seuls options acceptées sont "staging" et "production", ça semble être en dur.
Techniquement ce serait possible ou c'est chiant ?
Merci :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.