<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>AKIvan</title>
    <description>Ivan&apos;s blogl.</description>
    <link>https://akivan.github.io/</link>
    <atom:link href="https://akivan.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 01 Oct 2024 13:13:53 +0000</pubDate>
    <lastBuildDate>Tue, 01 Oct 2024 13:13:53 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>AWS CodePipeline Multi Account Cross Region</title>
        <description>&lt;center&gt;
&lt;img src=&quot;/static/assets/img/blog/awspipeline/deploy.png&quot; /&gt;
&lt;/center&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3 id=&quot;why-do-we-need-this&quot;&gt;Why do we need this?&lt;/h3&gt;

&lt;p&gt;There are many use-cases where multi-account and cross-region CloudFormation stacks can be useful.
It happens a lot when you have one pipeline but the same deployment need to be done on different region, and also to cover the concept of test and production.
This is some main steps that can help you start from some Account like (Tools) and deployment goes to Test and Production Account but on two regions or at least can help you to build similar one.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AWS CodePipeline is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates. CodePipeline automates the build, test, and deploy phases of your release process every time there is a code change, based on the release model you define. This enables you to rapidly and reliably deliver features and updates.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So the first thing is S3 Bucket on each region that we desire to deploy. After the buckets are created in their respective region, I decided to use SSM Parameters to provide the Pipeline with the buckets.
Pipeline needs 1 bucket per target region.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3 id=&quot;codebuild&quot;&gt;CodeBuild&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;AWS CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The most relevant attributes here are the environment variables containing each region bucket and the buildSpec path which should be placed inside the source code that the Pipeline will fetch from GitHub template and have it as ready to deploy part. 
Prepare your environments to have S3 bucket to store the templates or source of the builds there. And if you are using encryption for it, that means you should crate KMS Keys for each region too.&lt;/p&gt;

&lt;p&gt;In this step, you create a build specification (build spec) file. A buildspec is a collection of build commands and related settings, in YAML format, that CodeBuild uses to run a build. Without a build spec, CodeBuild cannot successfully convert your build input into build output or locate the build output artifact in the build environment to upload to your output bucket.
The main command and stuff is happening in the build configuration section in this file.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;version: 0.2

env:
  parameter-store:
    GIT_USER: &quot;git-user&quot;
    GIT_PASS: &quot;git-pass&quot;

  build:
    commands:
      - sam build -t template.yml
      - sam package --template template.yml --s3-bucket &quot;$S3_BUCKET_region1&quot; --s3-prefix &quot;$PROJECT_ID/builds&quot; --output-template template-export-region1.yml --region eu-west-1
      - sam package --template template.yml --s3-bucket &quot;$S3_BUCKET_region2&quot; --s3-prefix &quot;$PROJECT_ID/builds&quot; --output-template template-export-region2.yml --region ap-southeast-1

  post_build:
    commands:

artifacts:
  type: zip
  files:
    - template-export-region1.yml
    - template-export-region2.yml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As you can see, it’s a different template export for each region and for each region there is a separate S3 bucket to store it, this can be put as one template but if you have different templates you can play it like this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3 id=&quot;cloudformation&quot;&gt;CloudFormation&lt;/h3&gt;

&lt;p&gt;Back to the cloudformation template.
From the resource perspective we will start with defining the CodeBuild service. Note here that we are using this build for out template and as mention above, we need to create environment variables for each region/S3 bucket where we going to deploy it.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;BuildProject:
    Type: AWS::CodeBuild::Project
    Properties:
      Description: !Sub Code Build project generated for ${ProjectName}
      ServiceRole: !Ref BuildRole
      EncryptionKey: !Ref KMSKEY
      Environment:
        Type: linuxContainer
        ComputeType: BUILD_GENERAL1_SMALL
        Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
        EnvironmentVariables:
          - Name: S3_BUCKET_region1
            Value: !Ref S3BUCKETregion1
          - Name: KMSKey_region1
            Value: !Ref KMSKEYregion1
          
          - Name: S3_BUCKET_region2
            Value: !Ref S3BUCKETregion2
          - Name: KMSKey_region2
            Value: !Ref KMSKEYregion2
          
          - Name: ACCOUNT_ID
            Value: !Sub ${AWS::AccountId}
          - Name: AWSREGION
            Value: !Sub ${AWS::Region}
      Source:
        Type: CODEPIPELINE
      TimeoutInMinutes: 10
      Tags:
        - Key: Name
          Value: !Ref ProjectName
      Artifacts:
        Type: CODEPIPELINE
      Cache:
        Type: LOCAL
        Modes:
          - LOCAL_CUSTOM_CACHE
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3 id=&quot;codepipeline&quot;&gt;CodePipeline&lt;/h3&gt;

&lt;p&gt;Then we starting with the pipeline service or CodePipeline&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  Pipeline:
    Type: AWS::CodePipeline::Pipeline
    Properties:
      RoleArn: !Ref PipelineRole
      Name: !Ref AWS::StackName
      Stages:
        - Name: Source
          Actions:
            - Name: Source
              ActionTypeId:
                Category: Source
                Owner: ThirdParty
                Version: 1
                Provider: GitHub
              Configuration:
                Owner: GitHubOwner
                Repo: !Sub ${ProjectName}
                PollForSourceChanges: false
                Branch: !Ref Branch
                OAuthToken: &quot;&quot;
              OutputArtifacts:
                - Name: SourceArtifact
              RunOrder: 1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As a first action in this stage we defined the source, GitHub. There can be different ways to defined, this is one template.
Note here that we defined the output artifact that later we going to reference to. 
The second action is the build.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;      Name: Build
      Actions:
      -
        Name: BuildAction
        ActionTypeId:
          Category: Build
          Owner: AWS
          Version: 1
          Provider: CodeBuild
        Configuration:
          ProjectName: !Ref BuildProject
        RunOrder: 1
        InputArtifacts:
          - Name: SourceArtifact
        OutputArtifacts:
          - Name: BuildOutput
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The main stuff here to point are InputArtifacts and OutputArtifacts. As input, we have the source from the previous action “SourceArtifiact” and as output we have already build stuff named as “BuildOutput”.
Step three, we have the deployment processes.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;- Name: Deploy
    Actions:

        - Name: CreateChangeSet-region1
          Region: region1
          ActionTypeId:
            Category: Deploy
            Owner: AWS
            Version: 1
            Provider: CloudFormation
          InputArtifacts:
            - Name: BuildOutput
          Configuration:
            ChangeSetName: project-name-stack
            ActionMode: CHANGE_SET_REPLACE
            StackName: !Sub &apos;${ProjectName}-stack&apos;
            Capabilities: CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND
            TemplatePath: BuildOutput::template-export-region1.yml
            RoleArn: !Ref DeployRole
          RunOrder: 1
          RoleArn: !Ref PipelineRole

    # *** Duplicate / edit / delete these stacks as necessary for your desired regions ***
      # *** Change this name to match desired region
    - Name: DeployToRegion1
      # *** Change this for desired region
      Region: region1
      ActionTypeId:
        Category: Deploy
        Owner: AWS
        Provider: CloudFormation
        Version: &apos;1&apos;
      InputArtifacts:
        - Name: BuildOutput
      Configuration:
        ActionMode: CREATE_UPDATE
        Capabilities: CAPABILITY_IAM,CAPABILITY_AUTO_EXPAND
        RoleArn: !GetAtt CloudformationRole.Arn
        StackName: !Ref ApplicationStackName
        # *** Change this to match the region of this stack, 
        # *** using the file generated in the build step
        TemplatePath: BuildOutput::template-export-region1.yml
      RunOrder: 2
      # *** Change this name to match desired region

        - Name: CreateChangeSet-region2
          Region: region2
          ActionTypeId:
            Category: Deploy
            Owner: AWS
            Version: 1
            Provider: CloudFormation
          InputArtifacts:
            - Name: BuildOutput
          Configuration:
            ChangeSetName: project-name-stack
            ActionMode: CHANGE_SET_REPLACE
            StackName: !Sub &apos;${ProjectName}-stack&apos;
            Capabilities: CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND
            TemplatePath: BuildOutput::template-export-region2.yml
            RoleArn: !Ref DeployRole
          RunOrder: 1
          RoleArn: !Ref PipelineRole

    - Name: DeployToRegion2
      # *** Change this for desired region
      Region: region2
      ActionTypeId:
        Category: Deploy
        Owner: AWS
        Provider: CloudFormation
        Version: &apos;1&apos;
      InputArtifacts:
        - Name: BuildOutput
      Configuration:
        ActionMode: CREATE_UPDATE
        Capabilities: CAPABILITY_IAM,CAPABILITY_AUTO_EXPAND
        RoleArn: !GetAtt CloudformationRole.Arn
        StackName: !Ref ApplicationStackName
        # *** Change this to match the region of this stack, 
        # *** using the file generated in the build step
        TemplatePath: BuildOutput::template-export-region2.yml
      RunOrder: 2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So as first Action here is creating changeset. This is very useful for testing it and to see what kind of changes are going to be deployed. You can put approval action too.
As InputArtifacts we have the BuildOutput from the Build Action provided. Two main variables in this section is the “Region: region” and “RunOrder” (A positive integer that indicates the run order within the stage.)
Also the TemplatePath is the template that was defined in the buildspec file. This can be the same template or different one depending of what you are trying to do.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  ArtifactStores: 
    -
      Region: region1
      ArtifactStore:
        Type: &quot;S3&quot;
        Location: !Ref S3BUCKETregion1
        EncryptionKey:
          Id: !Ref KMSKEYregion1
          Type: KMS
    -
      Region: region2
      ArtifactStore:
        Type: &quot;S3&quot;
        Location: !Ref S3BUCKETregion2
        EncryptionKey:
          Id: !Ref KMSKEYregion2
          Type: KMS
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;At the end we end up with defining the artifact or the artifact store for each region (with their corresponding kms keys).
This should be the end results image of the pipeline&lt;/p&gt;

&lt;center&gt;
&lt;img src=&quot;/static/assets/img/blog/awspipeline/img.png&quot; width=&quot;400&quot; height=&quot;550&quot; /&gt;
&lt;/center&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;center&gt;
&lt;img src=&quot;/static/assets/img/blog/awspipeline/img_1.png&quot; width=&quot;400&quot; height=&quot;550&quot; /&gt;
&lt;/center&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Note: There should be IAM Roles and Assume Role for the AWS Account (Tools) to have access to other environments and Roles for the pipelines to execute the code.&lt;/p&gt;

&lt;p&gt;Source:
&lt;a href=&quot;https://blog.deleu.dev/cross-region-deployments-with-aws-codepipeline/&quot;&gt;Cross Region deployments with AWS CodePipeline&lt;/a&gt;
&lt;a href=&quot;https://itnext.io/cross-region-actions-with-codepipeline-on-aws-dcd786eb5fc&quot;&gt;Cross-Region Actions with CodePipeline on AWS&lt;/a&gt;
Thanks to &lt;a href=&quot;https://twitter.com/mikebroberts&quot;&gt;@mikebroberts&lt;/a&gt; for some tips.&lt;/p&gt;
</description>
        <pubDate>Tue, 09 Feb 2021 00:00:00 +0000</pubDate>
        <link>https://akivan.github.io/devops/2021/02/09/Multi-Region-Cross-Account-CodePipeline.html</link>
        <guid isPermaLink="true">https://akivan.github.io/devops/2021/02/09/Multi-Region-Cross-Account-CodePipeline.html</guid>
        
        <category>AWS</category>
        
        <category>CodePipeline</category>
        
        <category>multi region</category>
        
        <category>cross account</category>
        
        
        <category>Devops</category>
        
      </item>
    
      <item>
        <title>GitHub Profile Page</title>
        <description>&lt;p&gt;Building your network and sharing your work are probably the best ways to get your names out there in the community.&lt;/p&gt;

&lt;p&gt;As some of you may already know, GitHub recently added a hidden feature that lets you customize your GitHub profile page.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/static/assets/img/blog/gitprofile/gitprofile.png&quot; width=&quot;850&quot; height=&quot;550&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And here is how to do it.
Once you log into your GitHub account, create a new repository and name it as your Username.
Also, make it Public and check the “Initialize this repository with a README” file button. 
With this step you will get some default README template, and its very good for starting point.&lt;/p&gt;

&lt;p&gt;After that you pin gists and repositories to your profile so other people can quickly see your best work.&lt;/p&gt;

&lt;p&gt;You can add even list of some YouTube channels or Blogs from pages. And in order to do this you need to create some Action workflows in the github.
Here are the steps to do this:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Create a folder named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.github&lt;/code&gt; and create &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;workflows&lt;/code&gt; folder inside of it.&lt;/li&gt;
  &lt;li&gt;Create a new file named in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;workflowws&lt;/code&gt; directory, named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;youtube-workflow.yml&lt;/code&gt; with the following contents inside.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Not forget to change the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CHANNEL-ID&lt;/code&gt; with your channel id from YouTube.&lt;/p&gt;

&lt;p&gt;For more details on the Actions Workflows you can check the &lt;a href=&quot;https://github.com/gautamkrishnar/blog-post-workflow&quot;&gt;gautamkrishnar&lt;/a&gt; or &lt;a href=&quot;https://github.com/codeSTACKr/codeSTACKr&quot;&gt;codeSTACKr&lt;/a&gt; GitHub.&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Latest YouTube Videos&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;schedule&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# Runs every hour&lt;/span&gt;
    &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;cron&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;*&apos;&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;na&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;update-readme-with-youtube&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Update this repo&apos;s README with latest videos from YouTube&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;actions/checkout@v2&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;gautamkrishnar/blog-post-workflow@master&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;comment_tag_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;YOUTUBE&quot;&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;feed_list&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;https://www.youtube.com/feeds/videos.xml?channel_id=&amp;lt;CHANNEL-ID&amp;gt;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There are different feed list that you can add, like from “Stackoverflow”, “Spotify” or “Medium”.&lt;/p&gt;
</description>
        <pubDate>Sun, 30 Aug 2020 00:00:00 +0000</pubDate>
        <link>https://akivan.github.io/devops/2020/08/30/GitHub-Profile-Page.html</link>
        <guid isPermaLink="true">https://akivan.github.io/devops/2020/08/30/GitHub-Profile-Page.html</guid>
        
        <category>GitHub</category>
        
        <category>Profile</category>
        
        <category>page</category>
        
        <category>profile page</category>
        
        
        <category>Devops</category>
        
      </item>
    
      <item>
        <title>Artificial Intelligence in In Vitro Fertilization</title>
        <description>&lt;center&gt;
&lt;img src=&quot;/static/assets/img/blog/ai/embry/ai-ivf-09.png&quot; /&gt;
&lt;/center&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;EMBRY is an application that follows the whole IVF Process and predicts the outcome.&lt;/p&gt;

&lt;p&gt;In vitro fertilisation is a process of fertilisation where an egg is combined with sperm outside the body, in vitro. The process involves monitoring and stimulating womans ovary and removing oocyte and letting sperm fertilize them in a liquid, in a laboratory.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As we all know AI helps a lot in different fields, especially in medicine. So this is just another field where we try to implement this AI concept and be of help to embriologists as another technology that they can use in order to increase the success rate in IVF.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3 id=&quot;how-it-starts&quot;&gt;How it starts:&lt;/h3&gt;

&lt;p&gt;We start with a simple experiment, trying do detect mature eggs. Together with my wife, Mimoza Adji - Krsteva, who is an embryologist and a guide in IVF Procedure in this project, we spent some time (a lot), on more than 6500 images of eggs, trying to train the model to detect the quality. After some time we did the same for embrios, trying to detect in which day they are. Now we are working on detecting not just the quality but other details too, on the eggs and the embrios. The same methods will be applied on the sperm too. One thing to another we develop this concept and app that can predict the IVF outcome. You know how hard it can get when you work with someone who is always right 😃&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3 id=&quot;what-is-embry&quot;&gt;What is EMBRY:&lt;/h3&gt;
&lt;p&gt;EMBRY is an application that follows the whole IVF Process and predicts the outcome using AI concept. Embriologists write information about the patients and follow the whole cycle. Based on the information and patient history data we can calculate the outcome. On the other hand using the camera from the microscope, we developed another tool called CEMBRY, option for detection, that can help embriologists to faster detect the quality and any anomaly if they have.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;center&gt;
&lt;img src=&quot;/static/assets/img/blog/ai/embry/mature_egg.png&quot; width=&quot;500&quot; height=&quot;450&quot; /&gt;
&lt;figcaption&gt;We start with detection of mature eggs (The first picture)&lt;/figcaption&gt;
&lt;/center&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;CEMBRY can detect mature eggs, detect how old are the embrios, and currently we are finishing the process on detecting not just the quality of the embrios but other details, which currently are written manually by the embriologists.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;As I mentioned above, all this information is written and taken in calculation.
Prediction is the outcome of the algorithm calculation, based on the information from the patients in percentages. Beside the prediction part, we are opening another door for research. Hospitals, Clinics and Research centers can analyze patients data and try to find other problems for solving.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;center&gt;
&lt;img src=&quot;/static/assets/img/blog/ai/embry/day3.png&quot; width=&quot;500&quot; height=&quot;450&quot; /&gt;&lt;img src=&quot;/static/assets/img/blog/ai/embry/day5.png&quot; width=&quot;500&quot; height=&quot;450&quot; /&gt;
&lt;figcaption&gt;Detection of the day on Embrios&lt;/figcaption&gt;
&lt;/center&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3 id=&quot;benefits&quot;&gt;Benefits&lt;/h3&gt;

&lt;p&gt;With this kind of method and technology, we increase the success rate of IVF, the speed, and embriologists are more accurate in their choosing.
Saving the materials for further attempts if needed. Research centers even hospitals and clinics can participate in solving new problems. They can use this tool for educational purpose too.
Using this kind of technique we can save money that the goverment is giving for the first tree attempts and money that the patient is giving …
The next phases are detection of morphology, getting details, and suming the quality of the eggs and embrios, which can later be applied to the sperm too.&lt;/p&gt;

&lt;p&gt;The whole application is written in Python and Django as a framework. The hospital/clinics will have overview of the patients and results. No private data is stored, like Name and surnames, just results and numbers. Each hospital/clinic will have their own ID for each patient. They can re-calculate each attempt if they need to.&lt;/p&gt;

&lt;p&gt;Any IVF Hospital or clinic that wants to have or be part of this interesting research and prediction concept, can feel free to e-mail me. 
For any other details you can fallow us on &lt;a href=&quot;https://www.facebook.com/EMBRY-107066837502022/&quot;&gt;Facebook&lt;/a&gt; and &lt;a href=&quot;https://join.slack.com/t/embryworkspace/shared_invite/enQtOTA1NjYxMzQ0NTQ5LTQ1MDkxNmI4NDBjYmRmNjNiYmQ4YjAwMGI5MWRkZDhiYTAzMTg0MGJiNzcwZjg5ZGQwMDhhZDQ3YjU5ZjI5NDY&quot;&gt;Slack&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;center&gt;
&lt;img src=&quot;/static/assets/img/blog/ai/embry/overview.png&quot; width=&quot;600&quot; height=&quot;250&quot; /&gt;&lt;img src=&quot;/static/assets/img/blog/ai/embry/rezults.png&quot; width=&quot;400&quot; height=&quot;550&quot; /&gt;
&lt;figcaption&gt;Some overview of the app&lt;/figcaption&gt;
&lt;/center&gt;
</description>
        <pubDate>Fri, 20 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://akivan.github.io/html/ai/2019/12/20/Artificial-Intelligence-in-In-Vitro-Fertilization.html</link>
        <guid isPermaLink="true">https://akivan.github.io/html/ai/2019/12/20/Artificial-Intelligence-in-In-Vitro-Fertilization.html</guid>
        
        <category>AI</category>
        
        <category>Artificial Intelligence</category>
        
        <category>IVF</category>
        
        <category>In Vitro Fertilization</category>
        
        
        <category>HTML</category>
        
        <category>Ai</category>
        
      </item>
    
      <item>
        <title>Steps to create Kubernetes Cluster Federation</title>
        <description>&lt;p&gt;Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery.&lt;/p&gt;

&lt;p&gt;Kubernetes Cluster Federation, which was first released in version 1.3 back in July 2016, allows you to federate multiple clusters together and then control them as a single entity using a Federation control plane. Federation supports adding clusters located in different regions within the same cloud provider network, clusters spanning across multiple cloud providers and can even include on-premise clusters. This can be achieve by providing 2 major building blocks.&lt;/p&gt;

&lt;p&gt;So here are some reasons why to use federation&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Sync resources across clusters: Federation provides the ability to keep resources in multiple clusters in sync. For example, you can ensure that the same deployment exists in multiple clusters.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Cross cluster discovery: Federation provides the ability to auto-configure DNS servers and load balancers with backends from all clusters. For example, you can ensure that a global VIP or DNS record can be used to access backends from multiple clusters.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some other use cases that federation enables are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;High Availability&lt;/li&gt;
  &lt;li&gt;Avoiding provider lock-in
Federation is not helpful unless you have multiple clusters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some of the reasons why you might want multiple clusters are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Low latency&lt;/li&gt;
  &lt;li&gt;Fault isolation&lt;/li&gt;
  &lt;li&gt;Scalability&lt;/li&gt;
  &lt;li&gt;Hybrid cloud&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This scripts, that you can find on my &lt;a href=&quot;https://github.com/AKIvan/K8s-Federation&quot;&gt;Git&lt;/a&gt;, help you create Kubernetes Cluster on AWS in different regions and then create Federation between clusters.&lt;/p&gt;

&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;/h2&gt;

&lt;p&gt;First you need to configure the AWS Credentials or AWS Variable in the shell where you will execute the scripts. This can be done using the AWS CLI. If you don’t have it, you can install it using pip &lt;strong&gt;(“pip install awscli –upgrade”).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For general use, the aws configure command is the fastest way to set up your AWS CLI installation.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ aws configure
AWS Access Key ID [None]: AWSACCESSKEYID
AWS Secret Access Key [None]: ******************************
Default region name [None]: us-west-2
Default output format [None]: json
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then start execute the scripts for creating the Clusters in regions. example:
&lt;strong&gt;K8CUSA.sh&lt;/strong&gt; will create Kubernetes Cluster in USA ‘us-east-1’ Region.
You must have minimum 2 Clusters in order to Join them in Federations.
You can find the other two scripts for creating Cluster in Japan and  Europe (K8CJPN.sh and K8CEUR.sh).&lt;/p&gt;

&lt;p&gt;After You create the cluster you can then execute the &lt;strong&gt;K8CJoin.sh&lt;/strong&gt; in order to join them in cluster. If you have other cluster that you want to be in the federation you will have to add them in the script. To do this you have to add at the botom of the script another line:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;kubefed join ${ANOTHER_CLUSTER_ALIAS} --host-cluster-context=${USA_CLUSTER_ALIAS} --cluster-context=${ANOTHER_CLUSTER_ALIAS}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The host cluster context is the &lt;strong&gt;host cluster&lt;/strong&gt; hosting the components that make up the Federation control plane.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;
This is old way but usefull in order to start. Its possible that some images during the creation of cluster would not exists or are out of date, but that part is easy to fix.&lt;/p&gt;

&lt;p&gt;To delete the cluster, use the script that start with “DEL”, (&lt;strong&gt;DELK8CUSA.sh&lt;/strong&gt;, in order to delete USA Cluster)&lt;/p&gt;

</description>
        <pubDate>Thu, 31 Oct 2019 00:00:00 +0000</pubDate>
        <link>https://akivan.github.io/devops/2019/10/31/Kubernetes-Federation.html</link>
        <guid isPermaLink="true">https://akivan.github.io/devops/2019/10/31/Kubernetes-Federation.html</guid>
        
        <category>Kubernetes</category>
        
        <category>Kubernetes Cluster Federation</category>
        
        
        <category>Devops</category>
        
      </item>
    
      <item>
        <title>code snippet test</title>
        <description>&lt;p&gt;This is a raw snippet:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hello world
123
This is a text snippet
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is a JavaScript snippet:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;const add = (a, b) =&amp;gt; a + b
const minus = (a, b) =&amp;gt; a - b

console.log(add(100,200))  // 300
console.log(minus(100,200))  // -100
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is a Python snippet:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;def say_hello():
    print(&quot;hello world!&quot;)

say_hello()   // &quot;hello world!&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;p&gt;Side note comment: applied a bug fix similar to &lt;a href=&quot;https://github.com/Atlas7/atlas7.github.io/commit/6659f4a47f6ec66987adb0f683a9c6f3842252ae#diff-818954a41dbfb01af70050a459c603b9&quot;&gt;this commit&lt;/a&gt; to ensure code snippet does not collapse unexpectly upon clicking on it. This issue is tracked &lt;a href=&quot;https://github.com/jarrekk/Jalpc/issues/97&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Thu, 21 Dec 2017 00:00:00 +0000</pubDate>
        <link>https://akivan.github.io/html/2017/12/21/test-code-snippets.html</link>
        <guid isPermaLink="true">https://akivan.github.io/html/2017/12/21/test-code-snippets.html</guid>
        
        <category>Jalpc</category>
        
        <category>Jekyll</category>
        
        
        <category>HTML</category>
        
      </item>
    
      <item>
        <title>3 Steps (2 minutes) to Setup Your Personal Website with Jalpc</title>
        <description>&lt;p&gt;Everyone wants to have a personal website, you can display your infomation to public, post blogs and make friends. If you are CS engineer, haveing a self website will benefit your interview.&lt;/p&gt;

&lt;p&gt;So, if you like this website &lt;a href=&quot;https://jarrekk.github.io/Jalpc/&quot;&gt;https://jarrekk.github.io/Jalpc/&lt;/a&gt; or &lt;a href=&quot;http://www.jarrekk.com&quot;&gt;http://www.jarrekk.com&lt;/a&gt; and are willing to have a website, here is a way to build your website in 3 steps(2 minutes). Following are steps to setup your website(make sure you have basic knowledge of &lt;a href=&quot;https://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt; and &lt;a href=&quot;https://pages.github.com/&quot;&gt;GitHub Pages&lt;/a&gt;, if you want to custom css/js &lt;a href=&quot;https://github.com/npm/npm&quot;&gt;NPM&lt;/a&gt; is needed):&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Fork &lt;a href=&quot;https://github.com/jarrekk/Jalpc&quot;&gt;this project – Jalpc&lt;/a&gt; at &lt;a href=&quot;https://github.com&quot;&gt;GitHub&lt;/a&gt;. If you want to edit website at github, do it as following gif or clone forked repository. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git clone git@github.com:github_username/Jalpc.git&lt;/code&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;!-- ![edit](/static/assets/img/blog/3steps/edit.gif) --&gt;
 &lt;img src=&quot;/static/assets/img/blog/3steps/edit.gif&quot; width=&quot;75%&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Enter into repository directory and edit following file list:&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;_config.yml&lt;/strong&gt;: edit ‘Website settings’, ‘author’, ‘comment’ and ‘analytics’ items.&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;_data/landing.yml&lt;/strong&gt;: custom sections of index page.&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;_data/index/&lt;/strong&gt;: edit sections’ data to yours at index page, please notice comment at each file.&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;_data/blog.yml&lt;/strong&gt;: edit navbar(categories) of blog page, if you have different/more blog page, copy &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blog/python.html&lt;/code&gt; and change it to your category HTML file, and edit &lt;strong&gt;Python&lt;/strong&gt;, &lt;strong&gt;/python/&lt;/strong&gt; to your category name at items &lt;strong&gt;title&lt;/strong&gt; and &lt;strong&gt;permalink&lt;/strong&gt;, make sure title is the same as permalink but capitalized first letter(except HTML).&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;CNAME&lt;/strong&gt;: If you wanna release website at your own domain name: edit it and create &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch; if you want to use &lt;em&gt;github_username.github.io&lt;/em&gt;: leave it blank.&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;Go to repo’s settings panel, config &lt;strong&gt;GitHub Pages&lt;/strong&gt; section to make sure website is released.&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Push changes to your github repository and view your website, done!&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From now on, you can post your blog to this website by creating md files at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;post/&lt;/code&gt; directory and push it to GitHub, you can clear files at this directory before you post blogs.&lt;/p&gt;

&lt;p&gt;If you like this repository, I appreciate you star this repository. Please don’t hesitate to mail me or post issues on GitHub if you have any questions. Hope you have a happy blog time!😊&lt;/p&gt;
</description>
        <pubDate>Tue, 31 Jan 2017 00:00:00 +0000</pubDate>
        <link>https://akivan.github.io/html/python/2017/01/31/3-steps-to-setup-website-with-Jalpc.html</link>
        <guid isPermaLink="true">https://akivan.github.io/html/python/2017/01/31/3-steps-to-setup-website-with-Jalpc.html</guid>
        
        <category>Jalpc</category>
        
        <category>Jekyll</category>
        
        
        <category>HTML</category>
        
        <category>Python</category>
        
      </item>
    
  </channel>
</rss>
