Skip to content

badtux66/php_url_shortener

Repository files navigation

php_url_shortener

This project deploys the application polr at https://github.com/badtux66/polr, which is a fork of https://github.com/cydrobolt/polr.

Prerequisites

Before running the project, you need to have Python3, Ansible, Vagrant, and VMware Workstation Pro or VMware Workstation Player installed on your system. This application stack is designed for Unix-like operating systems. If you want to run it on a Windows machine, you will need to use Windows Subsystem for Linux.

Installation

Here are the required commands to run the application:

$ git clone https://github.com/badtux66/php_url_shortener
$ cd /php_url_shortener
$ sudo vagrant up --provision;
$ ansible-playbook devops-playbook.yaml -i inventory.py

Since this is an alpha release of the project, and there may be some issues that will be resolved soon.

A script inserted into the Vagrant file will detect the network interface automatically, so you don't have to edit and change it manually. However, if you have another network interface using a subnet like 192.168.x.x, there may be a problem, and the script won't work. Additionally, if you are using a different kind of subnet, such as 10.7.34.0/24, it will also be a problem. These scripts are designed to make it easy for home users, but professionals can edit the files manually if needed.

Both the Vagrant file and the inventory.py file include scripts to recognize the third octet of the subnet provided by your router/wifi access point, which is of the form 192.168.x.y/24. The scripts will recognize and replace x automatically, but if the IP addresses 192.168.x.21 or 192.168.x.22 have been occupied beforehand, then the script will not work and will require manual configurations. In those cases, you can either manually edit the files or contact me for help.

Finally, you can find the information about the servers such as ssh credentials and ip addresses at the inventory.txt file after the installation but note that the the third ocate of the ip address will be missing you can leanr it by running one of the commands ifconfig or ip addr. For example:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.23.21  netmask 255.255.255.0  broadcast 192.168.23.255
       inet6 fe80::a00:27ff:feb8:6ce9  prefixlen 64  scopeid 0x20<link>
       ether 08:00:27:b8:6c:e9  txqueuelen 1000  (Ethernet)
       RX packets 7506  bytes 7119572 (6.7 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 3508  bytes 398973 (389.6 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

or

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:b8:6c:e9 brd ff:ff:ff:ff:ff:ff
inet 192.168.23.21/24 brd 192.168.23.255 scope global noprefixroute enp0s8
   valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:feb8:6ce9/64 scope link 
   valid_lft forever preferred_lft forever

Here in this examle 23 is the third octate of the ip address.

In this case, in order to login to login to Jenkins you need to go to http://192.168.23.22. It is going to ask for Intial Admin Password. To learn this you need to open a command promt and ssh [email protected] the the following command will give you the Initial Admin Password:

badtux@localhost:~> ssh [email protected]
[email protected]'s password: 
This box was generated by EuroLinux

Any suggestions are welcome at https://github.com/EuroLinux/cloud-images-rfc/

Happy using.
To delete this message use:
echo '' > /etc/motd
Last login: Thu Mar  2 09:48:09 2023 from 192.168.23.4
[pusula@jenkins01 ~]$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
a03ca442edbb4dab8a7af36d94b4949d

Copy and paste it then start using Jenkins.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages