technology

How to setup CI/CD with GitHub Actions for a React App with AWS EC2?

Here’s a tutorial on how to create a simple CI/CD with GitHub Actions for deploying React applications. Getting started GitHub Actions allows you to automate, customise, and execute software development workflows right in your GitHub repository. A workflow is a configurable automated process made up of one or more jobs. You can configure your workflows to run when specific activity on GitHub happens, at a scheduled time, or when an event outside of GitHub occurs. The workflow configuration is defined by a YAML file. GitHub provides preconfigured workflow templates. Before we start on setting up the actions Github would require a few secrets to identify the EC2 instance. Seeking the secrets First, on your React App GitHub repository, navigate to the main page of the repository, click Settings. Inside settings you’ll find actions which will contain repository secrets. These secrets are encrypted environment variables that we create in an organization repository, or repository environment. Now is the chance to get back to our EC2 Dashboard to the respective instance and get the details for the instance in which we are going to deploy. You can visit this to see how to setup EC2 instance for React Apps We’ll start with the basics and define the host machine i.e IP of the instance. Click on the new repository secret and fill in the values.. Refer to the following table on how we do it. DEPLOY_HOST Public IP of your EC2 instance DEPLOY_KEY Copy paste the content from your pem file DEPLOY_PORT 22 DEPLOY_TARGET Location for the folder in which files will be stored in the instance DEPLOY_USERNAME ssh username for your instance A small tip here, if you are deploying in the home location of your instance path to it would be /home/ubuntu/folder_name if you are on an Ubuntu Instance. Defining the workflow process Then, you’ll see suggestions of CI templates that are the best fit for your project. You can use workflow templates as a starting place to build your custom workflow. In this case, click Set up this workflow, under the name of the template NodeJS. Setting up the Workflow Now there are two ways you can go around, you can choose from a predefined template provided by Github or set up your own workflow. In this tutorial we are going to set up our own workflow. And don’t worry we’ll share our workflow here as well. You can use this workflow code: name: Build React Files & Deploy to EC2 amazon There are 2 events that trigger the workflow on push or pull request. The virtual environment used to run the workflow is an Ubuntu machine in the latest version. In the steps section, 2 actions and 3 NPM scripts are being used. The first action actions/checkout@v2 is a standard that you must include in your workflow before other actions when your workflow requires a copy of your repository’s code. The second one, as the name suggests, it is a set up for Node.js, as you can see, the set up is made in different versions of Node.js, through an array with all the versions used. After adding the deploy command on your workflow, click Start commit, and click Commit new file. After commiting the code the pipeline should start running and it will start deploying the application. You can see the status of your workflow in the Actions tab And the status of your workflow will be shown there. Happy Coding 🙂 To learn more about the importants of CI/CD, do check out our blogs: https://nyxwolves.com/ci-cd-pipelines-for-development-businesses-post-corona/ https://nyxwolves.com/web-development/ways-ci-cd-can-increase-your-productivity/   References: · https://github.com/features/actions

Read more

Top 5 Future technologies to await in 2022

Introduction After the pandemic, we don’t want to go out. But, yes, almost everything has changed, and so has technology. Tech companies have already begun using innovative technologies even before we know. So, here is a wrap-up of technologies that you will learn in the meantime for the year 2022. RPA – Robotic Process Automation RPA automates jobs that are done routinely over time. Take an example of your keyboard suggestions helping you get rid of typing the whole thing and giving you the exact or alternative words. Similarly, RPA will be used for replying to emails, processing transactions, saving data, and even more.  Technology that is automating jobs (oh yes, we might lose jobs now) McKinsey found that 5 percent of the occupation can be automated, and nearly 60 percent can be partly automated. Note that RPA will be accurate and essential for data-driven companies. But RPA can develop and open for greater scope in career opportunities by looking out for RPA analysts, developers, and even a consultant. Edge Computing Coming to Edge Computing, the technology is utilized to increase the speed of the data transferred through the cloud in time. As companies make cloud computing mainstream, there is room for data and more space but delays while transferring data. So it has become hard to proceed to transfer or prepare to send data in a short time. Edge computing (take it as on edge) will make the process smooth, taking from one edge without trouble to another edge in time without waiting or lost data.  PEC – Privacy Enhancing Computation Privacy Enhancing Computation (Protection of data, you know) has successfully implemented data protection security mechanisms. Moreover, they manage the various means of individuals concerned about securing their documents’ by encryption (seems doable).  PEC will eventually ensure security while businesses purchase and sell cloud-based assets in extremely efficient marketplaces. At an earlier stage, it allows companies to effortlessly update their data sharing proficiency and monetize the prospects to help them achieve their business goals. PEC is a high-level technology that will protect individual users’ data (associated personally or professionally) and eliminate any dangers linked with sensitive data disclosure. CNP – Cloud Native Platforms CNP is well aware of creating, monitoring, and optimizing applications that rely on other clouds. Indeed, IBM’s study shows that the usage of CNP is rising among the companies and predicted that more than 50 percent of the upcoming applications will be developed on their cloud natives.  If you own a cloud company, then yes, the news is for you. You can save some colossal amounts being spent on traditional management and shift to automated tasks. Meanwhile, adopting cloud-native into your business strategy will let you utilize, build, and maintain such solid and appealing CNPs quickly and purposefully to meet changing client demands. IoB – Internet of Behaviour Internet of Things to Internet of Behaviour we have all grown so much in technology. However, understanding how critical it is to collaborate with giant digital behemoths to achieve real user engagement for clients, IoB will make the task easier. Internet of Behaviour first accumulates data on user behavior, such as their areas of interest, when researching any item or service. Later, with the appropriate use of technologies (say, data analytics), businesses can make the best use of their preferences and extract rocket-speed ROI in all possible ways. As a result, they will majorly result in increased competitiveness and scalability. Plus, here is more to these innovations, and we couldn’t put them all together. So maybe in the near-future, when we think about any product, it just appears physically. – Take it easy. 

Read more
CI/CD

How CI/CD Pipelines for Development Businesses Can Survive in a Post-Corona Economy

If your company is considering moving to continuous integration and delivery (CI/CD) style of software development, the first question you may have is if this is a smart idea.  Shifting and training your employees will require time and money, but it’s not always apparent what the benefit will be or when you’ll see any return.  It’s understandable to be cautious and not jump on board with whatever the latest term is.  CI/CD has also demonstrated its worth not only in terms of speed—which isn’t a criterion of success in and of itself—but also in terms of delivering tangible business value, such as reducing time to market for new applications, features, and services, and enhancing KPIs. That is why corporate decision-makers must look past the hype and gain a thorough understanding of what CI/CD is and what it can provide a company. That way, there will be maximum buy-in throughout the organization, not only in IT and operations.  Let’s take a look at some of the benefits of CI/CD pipelines to help your firm decide whether or not to invest in them. But trust me, I have got something for you. Ensure high-quality code The most important reason to conduct DevOps is to improve code quality, and CI/CD is, of course, the most important procedure for DevOps teams. Because CI/CD pipelines include test automation, developers can learn about code issues almost immediately. Teams don’t waste time or resources on defective code, and developers aren’t bombarded with constant “fix” requests after they’ve moved on to other projects, thanks to the concept of “failing quickly.” Time is saved, money is saved, and engineers aren’t wasting their time switching between contexts… win, win, win.  Streamlined rollback A CI/CD pipeline allows developers to fail quickly and recover even more quickly. Pushing code into production is a simple procedure, and if there are any problems, you can easily roll it back. The ability to quickly roll back code saves time, energy, and resources for teams, and leads to speedier bug repairs.  Regular update ad feedback A DevOps platform with a single CI/CD workflow allows everyone on the team – including business stakeholders – to understand what’s going on, where it’s heading, and what might be going wrong. This may appear to be a basic concept, yet a single window into application development is quite groundbreaking.  Previously, there were so many tools in use that a project manager would have to look in multiple places and ask multiple people for progress updates. Developers and operational professionals did not fare much better. That was a waste of time and resources, especially when issues developed.  Transparency and accountability at their best A CI/CD pipeline makes the overall software development process perfectly transparent to the corporate side thanks to constant feedback. Product managers can see the status of a project at a glance and keep track of accountability as needed.  Enhanced Mean time to resolution (MTTR)  DevOps teams can quickly identify and resolve issues thanks to the insight afforded by a CI/CD pipeline. A major development statistic, mean resolution time, or MTTR, is based on the capacity to quickly fix problems. The faster the MTTR, the more effectively the DevOps team works and the faster software can be delivered; in other words, MTTR has a significant impact on the bottom line of a company. Shift to CI and CD to boom your business! Developers who notice how easy it is to iterate the software will be ready to suggest improvements or report any undesirable behavior before it reaches a client.  As many businesses have learned, a strategic shift to CI/CD can result in more overall innovation, as well as improved communication and efficiency across the board. Which, in turn, provides you with a competitive advantage.

Read more
Contact us

Partner with Nyx Wolves

As an experienced provider of AI and IoT software solutions, Nyx Wolves is committed to driving your digital transformation journey. 

Your benefits:

What happens next?
1

We Schedule a call at your convenience 

2

We do a discovery and consulting meting 

3

We prepare a proposal 

Schedule a Free Consultation