ana

@anathesis

anas work

Private team

Joined on Oct 18, 2021

  • The twelve-factor methodology is used for building software-as-a-service (SAAS) applications using any kind of programming language together with different backing services. Following this approach, it is possible to deploy an app that has minimum deviations between production and development, can be scaled and deployed to most cloud platforms without the need for system administrators or servers, and has a great connection with the base operating system. In general, these cloud-friendly applications do not only operate in the cloud — they also adopt elastic scalability, ephemeral file systems and statelessness. It is common for them to approach everything as a service which makes them easy to scale and deploy swiftly together with fast delivery of features and other changes. There are particular rules, guidelines and recommendations to follow for each factor/aspect of this methodology in order to develop a cloud-native application. Codebase The first and priority of the twelve factors is the codebase and it represents a single repository or a set of them sharing a root commit. An application must have only one codebase which is consistent across all application deployments and monitored in a version control system. One codebase is thought to have multiple deploys if the developers and their code are well organized. On the other hand, if an application is made up of a couple or more source code repositories, automating the build and deployment phases of the app's life cycle is practically impossible. Having several development teams working on a single codebase can lead to considerable problems. As a conclusion, good developer expertise, coordination and structure among the teams enable the application to have a functioning and well-organized codebase. It is certainly possible to share code across many applications using the one code, one app approach. It's also crucial to determine if shared code should be treated as a microservice or as a standalone product. If shared code is a different product, it could be included as a dependency in the app. Dependencies Modern dependency management includes an integrated server that contains everything an application needs to run in a single build artifact. Applications should always bring their dependencies to the cloud in order to be self-contained and have an embedded server. The majority of programming languages have facilities that empower developers to define dependencies and delegate duty to make sure that those dependencies are fulfilled with a certain tool. Declared dependencies must be isolated at all times. Isolation might be accomplished by examining the specified dependencies and grouping them into a sub-structure beneath or inside the application's artifact. The code can't rely on dependencies already being present on the deployment destination. Furthermore, a cloud-native application never assumes the presence of system-wide packages. Possible failures can bring down a whole server or cost a corporation a financial loss due to undetected data corruption if dependencies are not adequately isolated. The idea of repeated deployments is important to properly manage an application's dependencies, thus no assumption should be made that the runtime into which an application is deployed is not automated. If dependencies are maintained with control and consistency, applications will be one level closer to being able to operate in cloud environments. Configuration The safest approach to save and maintain an application's configuration is to use env vars, which implies externalizing and storing the config in the environment. Non-changeable components do not belong in the configuration since it comprises of components that are variable throughout different deploys. Internal information that is part of the app must not be included in configuration. To clarify, if a value is consistent across all deploys, it isn't configuration. According to twelve-factor rules, configuration should be kept distinct from code, because code doesn't vary across different deploys, but configuration often does. With this separation, it is easier to alter environment variables as no code is being affected. It's extremely important to be cautious while keeping security credentials - they should never be kept in the codebase. Bundled assets remain part of the codebase even if security credentials are stored in some properties files or retrieved from the source code. Since environment variables are maintained individually for each deploy, the application concept that contains them scales efficiently.
     Like  Bookmark
  • 1 monolithic architectures and their problems 2 microservices and why both 1&2: http://aws-de-media.s3.amazonaws.com/images/AWS_Summit_Berlin_2016/sessions/pushing_the_boundaries_1300_microservices_on_aws.pdf
     Like  Bookmark
  • ana@DESKTOP-U0ULQ81:/mnt/c/Users/it/cloudana_git/LDM_GIT/ldm/ldm$ packer build -force -var "latest_ldm=$latest_ldm" -var-file="marketplace.pkrvars.hcl" test.pkr.hcl amazon-ebs.example: output will be in this color. azure-arm.example: output will be in this color. ==> azure-arm.example: Running builder ... ==> azure-arm.example: Getting tokens using device flow ==> azure-arm.example: Getting token for https://management.azure.com/ ==> azure-arm.example: Loading auth token from file: /home/ana/.azure/packer/oauth-184a7bbc-05d1-4814-acdb-8647136eff21mgmt.json ==> azure-arm.example: Auth token found in file: /home/ana/.azure/packer/oauth-184a7bbc-05d1-4814-acdb-8647136eff21mgmt.json ==> amazon-ebs.example: Force Deregister flag found, skipping prevalidating AMI Name
     Like  Bookmark
  • AWS Lambda has over 100,000 monthly active users, does billions of monthly executions, and is available in 22 worldwide locations. Many organizations have chosen to use the Function-as-a-Service (FaaS) model to enhance their business operations while saving both time and money. AWS Lambda has a variety of fascinating use cases, and few of them will be briefly covered in this chapter. Mass Emailing Each year, many huge corporations, for example, The New York Times, must send billions of transactional emails, as well as newsletters, and other publications. Mass emailing demands technological skill and is highly expensive, but it has become a vital aspect of any marketing campaign. Simple Email Service (SES) and AWS Lambda can work together to provide a cost-effective email flow, while the email list is safely stored in Simple Storage Service (S3). General steps are: Upload CSV file A CSV file is a trigger for an S3 event That S3 event invokes a Lambda Function Lambda function adds the CSV file to DynamoDB database
     Like  Bookmark
  • Best practice rules for AWS Lambda https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/Lambda/ also best practices, has some advices https://aws.plainenglish.io/aws-lambda-best-practices-7454da49314d --> Since serverless computing has its own set of disadvantages, it may not be appropriate for everyone or every use case. When it comes to developing Lambda code, knowing how a lambda function works may help us identify some of the best practices to follow when utilizing lambda functions, as well as the value of each best practice. Function code and dependencies, function configuration, logging and monitoring are among the key practices described below. 1. The lambda handler should be separated from service logic It is recommended that the business logic be written in a separate service layer rather than in the handler function itself. It's because it makes it much simpler to write more readable and intelligible code, as well as unit-testable code for the business logic. For example, the handler function will be an entry point for a lambda function and let's say that multiple variables are passed into the mentioned handler function. It may get problematic if each lambda triggers an event with the first parameter containing all information about the triggering event.
     Like  Bookmark
  • A lambda represents a block of code that may be given as an argument or a parameter to a function call. Lambda functions are short, simple functions written with very little syntax that may be kept in a variable and return a result. They usually don't have a stated name. Because of their simplicity, lambda functions reduce the number of lines of code in most of the cases and are used when a function is needed temporarily for a short period of time. It is also possible to define a lambda function and call it right after the function declaration, which cannot be done with def declared functions. AWS Lambda ONLY SOME LINKS AND HINTS Amazon Web Services (AWS) provides the Lambda compute service, which allows customers to run code without having to maintain or deploy their own servers. (https://aws.amazon.com/lambda/?c=ser&sec=srv) The cloud provider will process the code that has been written and deployed, as well as offer the required services and computational capacity. AWS Lambda supports several programming languages including Java, Node.js, SmallTalk, Python or C#, and allows bringing any artefact or library → AWS provides an SDK that makes it easier for you to write your Lambda functions and integrate them with other AWS services. (https://www.serverless.com/aws-lambda ) → 1 million requests free per month (only on amazon free tier?)
     Like  Bookmark
  • As previously stated, cloud computing refers to the use of software or services over an internet connection, with the processing taking place in a separate location yet being supplied via the internet. The word "as-a-Service" is present in each of the cloud computing models listed earlier, and it refers to the service provided by a third party. This implies that the company won't have to deal with some of the processes involved in on-premise software installation, depending on the adopted cloud computing model. Infrastructure-as-a-Service (IaaS) text Platform-as-a-Service (PaaS) text Software-as-a-Service (SaaS) text
     Like  Bookmark
  • On-premise software installation and deployment allows the organisation the highest level of control and responsibility over the entire infrastructure. Although being physically close to the stored data, having direct access to the hardware and its upgrades, and having almost fixed costs are all advantages of on-prem computing, there are certain drawbacks. Computing time and costs can be high due to power consumption and cost, more hardware storage space is required, hardware failures are possible, and thus data losses. With all this, it is necessary to have adequate, specialized and experienced people to manually manage and maintain the entire architecture and infrastructure of the business. With cloud and its services, many software functionalities, business operations and procedures may be enhanced and made easier to use. The ability to access and use a great number of application contents and resources from any location only using the Internet is the core incentive for utilizing the cloud services. Thus, by adopting cloud services, it is feasible to physically relocate a major portion of a company's operations while maintaining a stable and secure business environment. The delivery of various services through the Internet is known as cloud computing. These resources, technologies or services include data centres and storage, servers, networking, databases together with management and development tools, among other tools and applications. It is possible to operate a smaller or larger range of services depending on the needs of the organization, and cloud computing services are typically split into four concepts: Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), Software-as-a-Service (SaaS), and Function-as-a-Service (FaaS). The extent of services provided in each of these concepts or models varies. Briefly and concisely, high-level application programming interfaces (APIs) are provided by IaaS, whereas PaaS delivers a computing platform, which typically includes an operating system. SaaS allows software and applications to be installed and operated on cloud servers, and finally, FaaS, also often referred as serverless computing, is a model in which programs and applications don't require a dedicated machine to run and are deployed and executed on servers only when needed.[name=danielkrueger] ana - have to add exact motivation for lds under lambda & AWS cloud lambda function, review all this again later
     Like  Bookmark