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

EXPERIMENTAL: 'asterisk_rpi_patch: True' option for Raspberry Pi + preliminary path to FreePBX on PHP 8 #3523

Merged
merged 28 commits into from Apr 3, 2023

Conversation

@holta holta added this to the 8.1 milestone Apr 3, 2023
@holta
Copy link
Member Author

holta commented Apr 3, 2023

Tested successfully on Debian 11 (x86_64).

@EMG70 you might want to test this on a fresh 64-bit Raspberry Pi OS? If so, run:

curl iiab.io/install.txt | bash -s 3523

➡️ 2023-04-03 REVISION: Variable is now renamed to asterisk_rpi_patch ⬅️

AND THEN (when it asks you to edit /etc/iiab/local_vars.yml) look near the very bottom of the file, which is where you'd want to uncomment this line:

# asterisk_patch: True

WHICH MEANS... changing it to:

asterisk_patch: True

AND OF COURSE... set these 2 lines too:

pbx_install: True
pbx_enabled: True

(Finally then run sudo iiab to attempt the IIAB install including Asterisk 20 & FreePBX 16 !)

@holta holta marked this pull request as ready for review April 3, 2023 04:59
@jvonau
Copy link
Contributor

jvonau commented Apr 3, 2023

Question, in the above screenshot is port 83 being used for apache or are you using nginx directly?

@EMG70
Copy link
Contributor

EMG70 commented Apr 3, 2023

The first screenshot was ngix directly and this one is Apache port 83:Both working.
Uploading 59894712-FF43-4F26-9FCB-1788E9AC8508.jpeg…

@EMG70
Copy link
Contributor

EMG70 commented Apr 3, 2023

image

@jvonau
Copy link
Contributor

jvonau commented Apr 3, 2023

Ref: #2954 The apache option is more of a debugging option held over from the initial porting to nginx to check if an issue might be related to the use of nginx or a problem with asterisk/freepbx. I would rather set the default for apache to be not installed. The current code could install apache on demand at any point in the future if needed as the whole role does not need to be repeated now. Would you be comfortable enough to initially only use nginx?

@jvonau
Copy link
Contributor

jvonau commented Apr 3, 2023

The second picture has 'Asterisk' with some symbol other than a check mark like the first picture has.

@EMG70
Copy link
Contributor

EMG70 commented Apr 3, 2023

The second picture has 'Asterisk' with some symbol other than a check mark like the first picture has.

I will try again this evening ,it normally disappears after refreshing. I forgot to do that.

@EMG70
Copy link
Contributor

EMG70 commented Apr 3, 2023

Ref: #2954 The apache option is more of a debugging option held over from the initial porting to nginx to check if an issue might be related to the use of nginx or a problem with asterisk/freepbx. I would rather set the default for apache to be not installed. The current code could install apache on demand at any point in the future if needed as the whole role does not need to be repeated now. Would you be comfortable enough to initially only use nginx?

Noted.Thanks.

@jvonau
Copy link
Contributor

jvonau commented Apr 3, 2023

The application of the patch routine could be automated, with something like 'when: is_raspbian and something to identify the userspace' but that is not easy given dpkg_arch is not being exposed as a global variable now that #3518 was passed over in favor of #3519

@holta holta changed the title EXPERIMENTAL: 'asterisk_patch: True' option for Raspberry Pi + preliminary path to FreePBX on PHP 8 EXPERIMENTAL: 'asterisk_rpi_patch: True' option for Raspberry Pi + preliminary path to FreePBX on PHP 8 Apr 3, 2023
@jvonau
Copy link
Contributor

jvonau commented Apr 3, 2023

Might want to note that pbx_use_apache can be changed post-install with a pass through runrole or iiab-configure to activate the change. Other than that "push it" for greater feedback.

@@ -7,7 +7,7 @@
+ arch=$(uname -m)
if [ ${#pkgs} -ne 0 ]; then
- echo $pkgs | sed -r -e "s/ ?[^ :]+:i386//g"
+ if [ "$arch" = "X86_64" ]; then
+ if [ "$arch" = "x86_64" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, I must of been out of coffee. :)

@holta
Copy link
Member Author

holta commented Apr 3, 2023

This PR can't please everyone but brings options to Raspberry Pi, cleans up a lot of documentation, and is more than good enough!

Thanks to everyone and especially to @EMG70 who put in several full days of testing.

NOTE that Apache is being gradually phased out, and should be reduced in prominence, so will be installed on request only going forward, still by pbx/tasks/freepbx.yml during initial install of IIAB App roles/pbx. (I prefer not to raise the prominence of Apache from pbx/tasks/freepbx.yml to pbx/tasks/main.yml at this point, as it's going away entirely, or so we hope.)

Finally, FYI that {SMALL, MEDIUM, LARGE} local_vars.yml files will show these new defaults, during IIAB install:

# A full-featured PBX (for rural telephony, etc) based on Asterisk and FreePBX.
# REQUIRES PHP 7.4 e.g. Debian 11 Bullseye or 64-bit RasPiOS IF Bullseye-based.
# INSTRUCTIONS: https://github.com/iiab/iiab/tree/master/roles/pbx#readme
# If using PBX intensively, investigate nginx_high_php_limits further above.
pbx_install: False
pbx_enabled: False
pbx_use_apache: False   # 2023-04-03: Set to 'True' if nec -- please also
pbx_use_nginx: True     # read github.com/iiab/iiab/issues/2914 & #2916, THX!
# 2023-04-03: For EXPERIMENTAL testing on Raspberry Pi... (#3489, PR #3523)
asterisk_rpi_patch: True
asterisk_chan_dongle: False

@holta holta merged commit d72ada5 into iiab:master Apr 3, 2023
@tim-moody
Copy link
Contributor

What happens when:
pbx_use_apache: True
pbx_use_nginx: True

@jvonau
Copy link
Contributor

jvonau commented Apr 3, 2023

@tim-moody That was the default for the last while you get both active nginx on port 80 as usual and apache on port 83

@EMG70
Copy link
Contributor

EMG70 commented Apr 3, 2023

The second picture has 'Asterisk' with some symbol other than a check mark like the first picture has.

I will try again this evening ,it normally disappears after refreshing. I forgot to do that.
Apache 83 works ok,check mark comes upon refreshing.
911DA630-86A6-4B23-9D3E-D742990B6212

@jvonau
Copy link
Contributor

jvonau commented Apr 3, 2023

This PR can't please everyone but brings options to Raspberry Pi, cleans up a lot of documentation, and is more than good enough!

Thanks to everyone and especially to @EMG70 who put in several full days of testing.

NOTE that Apache is being gradually phased out, and should be reduced in prominence, so will be installed on request only going forward, still by pbx/tasks/freepbx.yml during initial install of IIAB App roles/pbx. (I prefer not to raise the prominence of Apache from pbx/tasks/freepbx.yml to pbx/tasks/main.yml at this point, as it's going away entirely, or so we hope.)

Just pull apache out now and don't look back as this is the last hold out to nginx only #2762

@jvonau
Copy link
Contributor

jvonau commented Apr 3, 2023

What happens when: pbx_use_apache: True pbx_use_nginx: True

@tim-moody That was the default for the last while you get both active nginx on port 80 as usual and apache on port 83

Think I have to clarify, with my version there was no need for any use of 'ignore' error skips as all the code paths were covered with apache.yml in main.yml. Now with the move to main.yml being dropped twiddling pbx_use_apache to True post-install will result in the red warning messages popping up when running through the code as apache is moved back to being an install time only option and the service isn't installed and can't be started with 'ignore' being a crutch to get through the role without puking.

@holta
Copy link
Member Author

holta commented Apr 3, 2023

Just pull apache out now and don't look back as this is the last hold out to nginx only #2762

That's a legit suggestion for the future.

Let's revisit that when FreePBX 17 is released with PHP 8 support (pray!!!)

@holta
Copy link
Member Author

holta commented Apr 3, 2023

What happens when:
pbx_use_apache: True
pbx_use_nginx: True

Running both web servers is a well-documented option, since 2021:

https://github.com/iiab/iiab/tree/master/roles/pbx#install-it

( Above was just re-worded ~2 hours ago, trying to de-emphasize this silly-but-still-if-absolutely-necessary option of running both web servers 😄 )

@jvonau
Copy link
Contributor

jvonau commented Apr 29, 2023

asterisk/asterisk#37

@jvonau
Copy link
Contributor

jvonau commented Apr 29, 2023

If this issue is fixed upstream pull the patching routine out.

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

Successfully merging this pull request may close these issues.

None yet

4 participants