From d52f5ca2b9cbee4073b92d6e24b3181d4fa96fbf Mon Sep 17 00:00:00 2001 From: haxala1r Date: Sun, 20 Jul 2025 20:29:58 +0300 Subject: [PATCH] Added README.md --- .demo2-instance-with-init-script.py.swp | Bin 0 -> 16384 bytes README.md | 98 ++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 .demo2-instance-with-init-script.py.swp create mode 100644 README.md diff --git a/.demo2-instance-with-init-script.py.swp b/.demo2-instance-with-init-script.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..4da3bb176e56f0422a1ef547afb3f23c0e2ffd31 GIT binary patch literal 16384 zcmeHNO^hQ)6|TSn2_!(^1Q#kESkEZa?XhPz+O;$&o>|YXllfyjv(Y9*t#WsHTsz%e zO?P>`PP73I+~C5ID+z}Hf*^#%F+wClT!J{j5ySxw95{oL@V)A`*E6%(&0&#{wp;rA zQ&s)mtFPXB_1do9(zVVOzvR{#uFo>I{P?ZG`PVKmr^?ts+!Udxr_^<~>sa|l-*XgW zuS^8iF3ar5=%lur>cdn-k%|v%eyE2*{_6NTN`?llPL%nMP>#GQq9l}AEs&9JI4aJJ zh<)jdlo{ZgGEU~FDlu*{zMG|GU&+9O%)n!8xlvyt2IeYH@Xvql;6Wy%oO{VY$w0|K z$w0|K$w0|K$w0}#1IK_#&arP|)*mTme!X~q=+yiB#pM<4&!6glujt<`+JAkj|J|bh zT+#kWp21*7>21*7>21*7>21*7>21*7>21*A02MmaSu?5I|jUL4D z|NrFq|LxB(_7)(4hkze_nz2`br-6Sz#@H`_H-K*e8j!&Az;&Ps{O3`O1AYj69~c8| z;N4F#_6Oh{;ANl+oCp5+N!S2<7gzxv2i|#vv7Z1p00j&H2l(g1jJ*zg2N(bsfk%OV zeS)z!fm^^D&;lL?e)Vz2dH@H$1pNMEjQtGwDR2Zl0h|N=iXSKb0=x~p1^gEHCGZ2F z1yq6az*m6RKZ^MR`@mO$i@-ndBg)@_H-YZ~-v%xKUj)7Y{0H%sT4+XU&pcZjnZ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WGS>z*; zVP@Eh21vL#avC6@(1fHo#vqf9DJH4l!P(e3K0gV*X+9+l6MsfFEdrPJu0@jLYt&3C zMs}ubVeJV8c@MT(9cN@`K^^6ny3@F1wcm-c*$EPTSt5PaAD^YsB}+rqvo7dn(jTVE zjNNPPz0SsUuiM@9*4umgh@TDY_!46;=OqJ27x!gqRA2eDpCDo8A7Lt=kF~*8i$l3s zNMeZ+Bjy{xx6!}A&T3q5Sxr=_?O%ny7piV8)!I0|aQ)O&Ut}t>-hbv+7`5J-wFM0u z#mMSgi;)Ow$%DnTb0rtHd}AnBmDLR$&IzMxV(N#;ik3_2);9rEA8C%&-wy z>vmIptOA*Sz*ul#yQkyfcwPW=aK~hV2$ac3onbD8WQ?RL7!BJnmRzJrB9mgfC=ihC zp(RSli$FUnS(E^@ec4mbsLK2yMHe!jj+=avJnaZN7VY9`A;6TWmUES^$+#9`eKS*o zoQ|Oo%Z3Tf74myy6az86+yLQu8kKD;mj(BzF9z6BagrNxMr9xwiK1D(WM@FBR1}&gJ1lfS3+=;!OhP@z018Sjl7!Fq zh3M-Agdy!%GrZ7nFsTk>4DW{;(lMa3JMn-S;dbNCPmkvtZ1IFeBJ42ixx%_06;M=H zB|;&6Ookz%^DxVk*J55GP^OtEf%*GX-4#m6dYoTRX&v}LkH{uU0TWlWo=auMtPBXF zuT$n{Q!AprQmM4_Bl0#l*KL7A6^K1W&({$>(6EIK36)T*!)yFX_cCr`^!)#GJm3Er zpyz))+S==Ve18x4ThaF?>MyU7fs%oefs%oefs%oefs%oefs%oefs%oefs%p$D+cJd e;{4x2`dQVpf01||$DdMF&$IvJc~$(F#QqE9m>$^x literal 0 HcmV?d00001 diff --git a/README.md b/README.md new file mode 100644 index 0000000..37674a6 --- /dev/null +++ b/README.md @@ -0,0 +1,98 @@ +# Cloud Computing Project Submission +Group Number 2 + +Members: +- Emin Arslan 1581975, fd0003933 +- Yash Sharma 1573145, fd0003398 +- Sagarkumar Dipakbhai Rokad 1566440, fd0003372 +- Abhimanyu Rajesh Kanase 1569090, fd0003385 + + +## First Task + +First we understood the architecture of the faafo application and commands. +Then we changed the repository link in the install script for faafo to point +to Emin's [custom git repository](https://git.emin.software/haxala1r/cloud-computing-msc-ai-examples). This was necessary because the demo +deployment scripts pull from the remote repository when installing faafo +on an instance and local changes are ignored. + +After that, we added a few custom commands to the faafo command line tool. +First we added a delete-all command, which deletes all fractals. Second, +we added a delete-selected command, which takes a list of fractal UUIDs and +deletes all of them. By adding these custom commands we achived a greater +understanding of the faafo command line tool so that we can add more commands +as needed in the future. We also added help messages for the new commands +to provide a better user experience. + +List of changed files for task 1: +- faafo/contrib/install.sh (changed repository link) +- demo2-instance-with-init-script.py (changed repository link) +- demo3-microservice.py (changed repository link) +- demo4-1-scale-out.py (changed repository link) +- demo4-2-scale-out-add-worker.py (changed repository link) +- faafo/bin/faafo (added commands) + + +## Second Task + +The faafo application as given stores all image data, including the image file +itself in an SQL database. For the second task we changed the faafo API and +worker programs (faafo/faafo/api/service.py and faafo/faafo/worker/service.py) to store the image file in OpenStack object storage. Other +data about the image will still be stored in the database. + +We changed the API server such that it will no longer store the image as a blob +in the database. Instead, only a URL to the object containing the image data +is stored, and the API retreives this data when the image is requested. + +Upon first running the API, a new container with the name "fractals" will +be created under our account. This container will hold all generated fractal +image files. + +OpenStack authentication is currently performed by a pre-generated application +credential. In the first attempts we used password authentication directly. +In a real deployment, it would be best to instead have the deployment +script automatically generate a new set of application credentials for the API +and workers to use. + +OpenStack authentication using libcloud was a difficult roadblock. For a long +while we were stuck on this issue, as the example given in the documentation +did not work for us. We were eventually able to fix this by forcing v3 +authentication directly and using the base URL instead of the one given +by OpenStack. Here is the code example that worked for us: + +``` +from libcloud.storage.types import Provider +from libcloud.storage.providers import get_driver +import libcloud.security +libcloud.security.VERIFY_SSL_CERT = False + +cls = get_driver(Provider.OPENSTACK_SWIFT) +# Use these parameters for v3 authentication +driver = cls( + 'CloudComp2', # username + 'demo', # password + ex_force_auth_url='https://10.32.4.29:5000/', # NOT https://10.32.4.29:5000/v3 + ex_force_auth_version='3.x_password', # '3.x_appcred' for application credentials + ex_tenant_name='CloudComp2', + ex_domain_name='default' +) + +print(driver.list_containers()) +``` + +This code sample uses username and password directly for authentication. +Our submitted faafo application instead uses application credentials to +authenticate. In this case we had to change ex_force_auth_version to +'3.x_appcred'. + +We tried deploying using the demo2, demo3, demo4-1 and demo4-2 deployment scripts. +All of these deployments were successful and made use of OpenStack object storage +correctly, showing that the application in its current state is scalable. + +List of changed files for task 2: +- faafo/faafo/api/service.py +- faafo/faafo/worker/service.py + + +A more detailed breakdown of what exact changes were made to which file can +be found in [our git repository history](https://git.emin.software/haxala1r/cloud-computing-msc-ai-examples). \ No newline at end of file