bookmark_borderComposer Smart Updater

Reflection:
In a big Symfony v5.0 project we wanted to upgrade composer packages (around +140 updates available includes orm, doctrine packages, fixtures, migration, api platform, etc)
after update using composer update when run the migration symfony console doctrine:migration:migrate -n migration not working fine because of conflicts and different migrations table name pattern so it can’t detect names of migrations file and because some packages needs PHP v7.4.11 (relreased this month 1st October 2020) and our env uses PHP v7.4.3 and needs Composer v2 and our env used old Composer version.


I created a Python script that reads composer.json file and loop over its required and required-dev packages and install each package individually then run migration command and check if everything is working fine or not!

composer-smart-updater.py on GitHub: https://github.com/khaledalam/composer-smart-updater

This script will helps to detect and find which exactly package that cause this conflict.

Plus I unify infrastructure cloud architecture env (AWS) and Git pipelines (BitBucket) container images to use most updated versions.

bookmark_borderUsing Pipelines to Invalidate AWS CloudFront Cache that Pointing to AWS S3 bucket

Steps:

  • Add Repository Variables for Distribution IDs
  • Add Repository Variables for AWS keys as well
  • Add invalidate step in your pipeline
    e.g.
- step:
          name: ">> Invalidate AWS CloudFront (by: Khaled alam)"
          script:
          - pipe: atlassian/aws-cloudfront-invalidate:0.4.1
            variables:
              AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
              AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
              AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
              DISTRIBUTION_ID: $TEST_CLOUDFRONT_DISTRIBUTION_ID
              # PATHS: <string> # Optional
              DEBUG: "true" # Optional

Note: in case you want to invalidate specific files or paths, you should define that in PATHS: <string>

bookmark_borderIdeal City

Cloud system micro-serviced using Docker, Python, Golang, Node, Flask, Gin, Express.js, MongoDB

Reflection

Show cheaper products of a target city comparing to your city!

=> City Searcher API Microservice Repo

Run
sh run.sh

output

live demo: http://khaledalam.net:8001


Architecture

GitHub: https://github.com/khaledalam/ideal-city