Whatever message this page gives is out now! Go check it out!
sudo apt update
sudo apt upgrade –y
sudo apt install ansible –y
sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible –y
sudo apt install python3-pip -y
pip3 install ansible
ansible --version
mkdir -p ~/coldfusion-ansible/{files,inventory,playbooks}
cd ~/coldfusion-ansible
nano inventory/hosts
[coldfusion_servers]
cf-server ansible_host=192.168.1.100 ansible_user=ubuntu ansible_ssh_private_key_file=~/.ssh/id_rsa
[coldfusion_servers:vars]
ansible_python_interpreter=/usr/bin/python3
cp /path/to/ColdFusion_2023_WWEJ_linux64.zip file
cp /path/to/silent.properties file
cp /path/to/hotfix.properties file
cp /path/to/settings.json file
nano playbooks/install-coldfusion.yml
- name: ColdFusion 2023 Installation,Hotfix Installation, Migration and Connector Configuration
hosts: coldfusion_servers
become: yes
tasks:
- name: Copy required files to /opt
copy:
src: "{{ item }}"
dest: /opt
loop:
- ColdFusion_2023_WWEJ_linux64.zip
- silent.properties
- hotfix.properties
- settings.json
- name: Install unzip
package:
name: unzip
state: present
- name: Ensure firewalld and firewall Python library are up to date
package:
name:
- firewalld
- python3-firewall
state: latest
- name: Install Apache2
apt:
name: apache2
state: present
update_cache: yes
- name: Ensure Apache2 is running and enabled on boot
systemd:
name: apache2
state: started
enabled: yes
- name: Open Apache port 80 in firewall
firewalld:
port: 80/tcp
permanent: yes
state: enabled
immediate: yes
- name: Unzip ColdFusion installer
ansible.builtin.unarchive:
src: /opt/ColdFusion_2023_WWEJ_linux64.zip
dest: /opt
remote_src: yes
- name: Unzip ColdFusion WWEJ installer again
ansible.builtin.unarchive:
src: /opt/ColdFusion_WWEJ_linux64.zip
dest: /opt
remote_src: yes
- name: Set recursive permissions for /opt/ColdFusion and Configuration files
file:
path: "{{ item.path }}"
mode: "{{ item.mode }}"
recurse: "{{ item.recurse | default(omit) }}"
loop:
- { path: "/opt/ColdFusion", mode: "0755", recurse: yes }
- { path: "/opt/silent.properties", mode: "0644" }
- { path: "/opt/hotfix.properties", mode: "0644" }
- { path: "/opt/settings.json", mode: "0644" }
- name: Install ColdFusion silently
command: /opt/ColdFusion/cfusion/bin/cfinstall.sh -f /opt/silent.properties -i silent
- name: Restart ColdFusion server
command: /opt/ColdFusion/cfusion/bin/coldfusion restart
- name: Open port 8500 in firewall
firewalld:
port: 8500/tcp
permanent: yes
state: enabled
- name: Download hotfix package
get_url:
url: https://cfdownload.adobe.com/pub/adobe/coldfusion/2023/packages/hotfix-packages-cf2023-015-330825.zip
dest: /opt/hotfix-packages-cf2023-015-330825.zip
- name: Create bundles directory
file:
path: /opt/bundles
state: directory
- name: Extract hotfix package
ansible.builtin.unarchive:
src: /opt/hotfix-packages-cf2023-015-330825.zip
dest: /opt/bundles
remote_src: yes
- name: Stop ColdFusion server
command: /opt/ColdFusion/cfusion/bin/coldfusion stop
- name: Copy files to ColdFusion bundles directory
copy:
src: /opt/bundles/
dest: /opt/ColdFusion/bundles/
remote_src: yes
- name: Apply hotfix
command: /opt/ColdFusion/jre/bin/java -jar -Djdk.util.zip.disableZip64ExtraFieldValidation=true /opt/ColdFusion/bundles/updateinstallers/hotfix-002-331451.jar -i silent -f /opt/hotfix.properties
ignore_errors: yes
become: yes # Ensures the command runs as sudo
- name: Install all ColdFusion packages
shell: echo "Y" | ./cfpm.sh update all
args:
chdir: /opt/ColdFusion/cfusion/bin/
become: yes
- name: Import ColdFusion settings
command: /opt/ColdFusion/config/cfsetup/cfsetup.sh import NOSQL /opt/settings.json /opt/ColdFusion/cfusion/ -p=admin@123
args:
chdir: /opt/ColdFusion/config/cfsetup
- name: Configure ColdFusion Apache connector
command: ./wsconfig -ws Apache -dir /etc/apache2/ -bin /usr/sbin/apache2ctl -script /usr/sbin/apache2ctl -v #The path changes as per the Apache installation.
args:
chdir: /opt/ColdFusion/cfusion/runtime/bin
become: yes # Ensures the command runs as sudo
- name: Restart ColdFusion server
command: /opt/ColdFusion/cfusion/bin/coldfusion restart
# The serial number of the previous version of ColdFusion. Use it when it is for an upgrade
# ColdFusion Administrator password
COLDFUSION_ADMIN_PASSWORD=Admin@123
# Internal webserver port
COLDFUSION_ADMIN_PORT=8500
# ColdFusion runtime user. Applicable for Linux and Ubuntu
COLDFUSION_RUNTIME_USER=root
# Install type - 1-Install new version of Adobe ColdFusion 2021 with a serial number , 2-30-day trial, 3-Developer Edition
INSTALL_TYPE=2
# Accept EULA- true. To proceed, you must accept the EULA
EULA_ACCEPTED=true
# Serial number of the new version of ColdFusion
SERIAL_NUMBER=
# IP address from which Administrator can be accessed
IP_ADDRESSES=
# Specify the deployment type- Production, Development, Staging, Testing, Disaster recovery
DEPLOYMENT_TYPE=Development
# Server profile - 1-Production+Secure, 2-Production, 3-Development.
SERVER_PROFILE=3
# Specify the RDS password
COLDFUSION_RDS_PASSWORD=Admin@123
# Name of the ColdFusion service
COLDFUSION_WIN_SERVICE_NAME=cf2023zipservice
# ColdFusion install location
COLDFUSION_INSTALL_LOCATION=/opt/ColdFusion/
INSTALLER_UI=silent
USER_INSTALL_DIR=/opt/ColdFusion
DOC_ROOT=/opt/ColdFusion/cfusion/wwwroot/
# The following applies only to multi-server scenarios.
INSTANCE_LIST=ALL
ansible-playbook -i inventory/hosts playbooks/install-coldfusion.yml --syntax-check
ansible-playbook -i inventory/hosts playbooks/install-coldfusion.yml --check
ansible-playbook -i inventory/hosts playbooks/install-coldfusion.yml -v
ps aux | grep coldfusion
netstat -tlnp | grep 8500