feat: add apisix fedora support#110
feat: add apisix fedora support#110Kushal-kothari wants to merge 2 commits intoapi7:masterfrom Kushal-kothari:master
Conversation
|
hi, do you have time to look at this PR? @imjoey |
imjoey
left a comment
There was a problem hiding this comment.
@Kushal-kothari Hi, great job and really impressive. I would prefer to reuse current code as much as possible in this PR, cause maybe some other distributions, such as RockyLinux, will be supported some day. Please let me know what do you think. Thanks.
|
|
||
| ifeq ($(filter $(app),apisix dashboard apisix-base),) | ||
| $(info the app's value have to be apisix or dashboard!) | ||
| ifeq ($(filter $(app),apisix_fedora apisix dashboard apisix-base),) |
There was a problem hiding this comment.
@Kushal-kothari there's no need to add this cause we still use apisix here.
| make package type=rpm app=apisix_fedora version=master checkout=master image_base=fedora image_tag=34 artifact=apisix-remote | ||
| make package type=rpm app=apisix_fedora version=2.2 checkout=2.2 image_base=fedora image_tag=34 |
There was a problem hiding this comment.
| make package type=rpm app=apisix_fedora version=master checkout=master image_base=fedora image_tag=34 artifact=apisix-remote | |
| make package type=rpm app=apisix_fedora version=2.2 checkout=2.2 image_base=fedora image_tag=34 | |
| make package type=rpm app=apisix version=master checkout=master image_base=fedora image_tag=34 artifact=apisix-remote | |
| make package type=rpm app=apisix version=2.2 checkout=2.2 image_base=fedora image_tag=34 |
There was a problem hiding this comment.
@Kushal-kothari we would better to keep using apisix here.
| COPY package-apisix.sh /package-apisix.sh | ||
| COPY usr /usr | ||
|
|
||
| RUN /package-apisix.sh No newline at end of file |
There was a problem hiding this comment.
An extra new line is needed here. Thanks.
| dist="el${IMAGE_TAG}" | ||
| elif [ "${IMAGE_BASE}" == "fedora" ] | ||
| then | ||
| dist="${IMAGE_BASE}${IMAGE_TAG}" |
There was a problem hiding this comment.
For the rpm in Fedora 34, the conventional dist is fc34, instead of fedora34. Thanks.
| # install apisix | ||
| RUN /install-common.sh install_apisix \ | ||
| # determine dist and write it into /tmp/dist file | ||
| && /determine-dist.sh No newline at end of file |
There was a problem hiding this comment.
We would better add an extra line here. Thanks.
| name: apisix-2.2-0.fedora34.x86_64.rpm | ||
| path: output/apisix-2.2-0.fedora34.x86_64.rpm |
There was a problem hiding this comment.
| name: apisix-2.2-0.fedora34.x86_64.rpm | |
| path: output/apisix-2.2-0.fedora34.x86_64.rpm | |
| name: apisix-2.2-0.fc34.x86_64.rpm | |
| path: output/apisix-2.2-0.fc34.x86_64.rpm |
| build-apisix_fedora-rpm: | ||
| ifeq ($(local_code_path), 0) | ||
| git clone -b $(checkout) $(apisix_repo) ./apisix | ||
| $(call build,apisix,apisix_fedora,rpm,"./apisix") | ||
| rm -fr ./apisix | ||
| else | ||
| $(call build,apisix,apisix_fedora,rpm,$(local_code_path)) | ||
| endif | ||
|
|
There was a problem hiding this comment.
@Kushal-kothari how about reusing build-apisix-rpm here, and check if the image_base is fedora to decide where to go then?
| @@ -0,0 +1,30 @@ | |||
| ARG IMAGE_BASE="fedora" | |||
There was a problem hiding this comment.
Also, how about reusing Dockerfile.apisix.rpm here, without adding this new file? Thanks.
| install_lua | ||
| } | ||
|
|
||
| install_fedora_dependencies_rpm() { |
There was a problem hiding this comment.
here, we can check if the environment key IMAGE_BASE is fedora, then we could know which function we should call. What do you think?
|
Thank you so much @imjoey for all the above suggestions.
True and most of the above changes you suggested are also based on that. I'll fix all the above changes shortly |
No description provided.