Connect with us

Publications

How to Build a Serverless Full-stack Application Using Git, Google Drive, and Public CI/CD Runners?

Avatar

Published

on

Ederson Brilhante Hacker Noon profile picture

@edersonbrilhanteEderson Brilhante

Senior Software Engineer with 11 years of professional experience working in large internet companies.

TL;DR – How I built the Vilicus Service, a serverless full-stack application with backend workers and database only using git and CI/CD runners.

What is Vilicus?

Vilicus is an open-source tool that orchestrates security scans of container images (Docker/OCI) and centralizes all results into a database for further analysis and metrics.

Vilicus provides many alternatives to use it:

This article explains how it was possible to build the Free Online Service without using a traditional deployment.

Architecture

The frontend is hosted in GitHub Pages. This frontend is a landing page with a free service to scan or display the vulnerabilities in container images.

The results of container image scans are stored in a GitLab Repository.

When the user asks to show the results from an image, the frontend consumes the GitLab API to retrieve the file with vulns from this image. In case this image is not scanned yet, the user has the option to schedule a scan using a google form.

When this form is filled, the data is sent to a Google Spreadsheet.

A GitHub Workflow runs every 5 minutes to check if there are new answers in this Spreadsheet. For each new image in the Spreadsheet, this workflow triggers another Workflow to scan the image and save the result in the GitLab Repository.

Why store in GitLab? GitLab provides bigger limits. Here’s a summary of differences in offering on public cloud and free tier:

 =========== ============ ==================== ============================= =====================================  Free users Max repo size (GB) Max file size (MB) Max API calls per hour (per client)  =========== ============ ==================== ============================= ===================================== GitHub 3 2 100 5000 BitBucket 5 1 Unlimited (up to repo size) 5000 GitLab Unlimited 10 Unlimited (up to repo size) 36000 =========== ============ ==================== ============================= ===================================== 

Google Drive

This choice was a “quick win”. In a usual deployment, the backend could call an API passing secrets without the clients knowing the secrets.

But because I am using GitHub Pages I cannot use that (Well, I could do it in the javascript, but anyone using the Browser Inspect would see the secrets. So let’s don’t do it 😉).

This makes the Google Spreadsheet perform as a Queue.

Google Form:

Google Spreadsheet with answers:

GitHub Workflows

The Schedule Workflow runs at most every 5 minutes. This workflow executes the python script that checks if there are new rows in the Google Spreadsheet, and for each row is made an HTTP request to trigger the event repository_dispatch.

This makes the workflows perform as backend workers.

Schedule in the workflow:

name: Schedule
on:
 schedule:
 - cron: '*/5 * * * *'
...

Event repository_dispatch in WorkFlow:

name: Report
on: [repository_dispatch]
...

Screenshots

Schedule History:

Schedule WorkFlow:

Scans History:

Report Workflow:

Scan Report stored in GitLab:

Source Code:

Do you want to know more about GitHub Actions?

Github Pages

The Frontend is running in GitHub Pages.

By default, an application running in GH Pages is hosted as

http://<github-user>.github.io/<repository>

.

But GitHub allows you to customize the domain, because that it’s possible to access Vilicus using

https://vilicus.edersonbrilhante.com.br

instead of 

http://edersonbrilhante.github.io/vilicus

.

GitHub Workflow to build the application and deploy it in GH Pages

Building the source code:

- name: Build
 run: | cd website npm install npm run-script build
 env:
 REACT_APP_GA_CODE: ${{ secrets.REACT_APP_GA_CODE }}
 REACT_APP_FORM_SCAN: ${{ secrets.REACT_APP_FORM_SCAN }}

Deploying the build:

- name: Deploy
 uses: JamesIves/github-pages-deploy-action@releases/v3
 with:
 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 BRANCH: gh-pages
 FOLDER: website/build

Source Code:

Do you want to know more about GitHub Pages?

That’s it!

In case you have any questions, please ping me on LinkedIn.

Also published at https://dev.to/edersonbrilhante/a-serverless-full-stack-application-using-only-git-google-drive-and-public-ci-cd-runners-262l

Ederson Brilhante Hacker Noon profile picture

Tags

Join Hacker Noon

Create your free account to unlock your custom reading experience.

Coinsmart. Beste Bitcoin-Börse in Europa
Source: https://hackernoon.com/how-to-build-a-serverless-full-stack-application-using-git-google-drive-and-public-cicd-runners-b56l34df?source=rss

Automotive

GM and LG Chem’s Ultium Cells partners with Li-Cycle to process manufacturing waste

Avatar

Published

on

Ultium Cells LLC, a joint venture between General Motors and LG Chem, has been steadily building up its battery cell manufacturing capacity in the U.S. since the venture was first announced in December 2019. But with each battery cell they produce, they’ll also produce waste – tricky-to-handle waste that also has too much inherent valuable to toss into a landfill.

Instead of throwing it away, Ultium is sending it to a recycler. The venture has executed an agreement with Canadian company Li-Cycle to recycle critical materials from the scrap produced from Ultium’s manufacturing processes from its Lordstown plant, starting later in 2020. The materials from the Lordstown location will be sent to Li-Cycle’s recycling location in Rochester, New York, to be processed and returned to the battery supply chain.

General Motors and LG Chem are clearly determined to scale their battery cell manufacturing. Around 5-10% of the output of a cell manufacturer is this excess scrap. Considering that the Lordstown facility will be capable of producing 30 gigawatt hours of capacity annually, it’s sure to produce a sizable amount of waste material. (For perspective, Tesla’s factory in Nevada has a 35 GW-hour capacity.)

Li-Cycle’s approach is different from more traditional recycling processes, co-founder Ajay Kochhar told TechCrunch. Traditional recycling use a pyrometallurgical, or high temperature, process. With this process, batteries go into a furnace and excess material, like plastics and the electrolyte, are burned off, leaving around a 50% recovery rate for the valuable raw materials.

Li-Cycle also differs from competitors like Redwood Materials, which also use high-temperature, Kochhar explained. Redwood processes things like consumer electronics, which requires different approaches. Li-cycle uses a hydrometallurgical process that shreds – actually shreds, like a paper shredder – the battery materials in a submerged, proprietary solution. Doing it this way reduces the thermal risk of a fire and recovers up to 95% of the battery materials (Redwood also claims a recovery rate of 95-98%). By not burning anything off, the company also avoids producing potentially toxic emissions, Kochhar said.

Shredded lithium-ion batteries. Image Credits: Li-Cycle (opens in a new window)

The cathode and anode material is converted into battery-grade chemicals, like lithium carbonate, nickel sulfate and cobalt sulfate. Li-Cycle works with a company Traxys, which buys the chemical material.

“And where it goes from there is back into cathode making and back into the broader economy and battery supply chain,” Kochhar said. The next step would be a “true circular economy closed loop” where the same material used by a manufacturer is returned back to it.

The company has two recycling “spokes,” where shredding and mechanical separation occurs, in Rochester and Ontario, Canada, with a third commercial facility being built in Arizona. Once the Arizona facility becomes operational, Li-Cycle will be able to process around 20,000 metric tons, or 4 gigawatt-hours, of lithium-ion batteries annually. It’s also building what it calls a “hub” to make the battery chemicals in Rochester, which will have an annual capacity to process around 60,000 metric tons of battery scrap and “black mass” (a mix of cathode and anode material, and one of the outputs from the company’s “spokes”).

It works with 14 different automotive and battery manufacturers (though not all of those deals are public), as well as auto dealers and auto recyclers to accept and process spent lithium-ion batteries.

Ultium in April announced a second $2.3 billion U.S.-based battery factory in Spring Hill, Tennessee that is due to open in 2023. Both factories will supply the automaker with the cells needed for the 30 electric vehicle models it plans to launch by mid decade. However, it is not known if Li-Cycle will process waste from this plant, too.

Notably, the company also recycles R&D scrap from various automakers, giving Li-Cycle “a kind of first look at what’s coming down the pipe” in terms of battery technology, Kochhar said. That helps the company stay on top of the newest battery chemistries and technologies, like solid-state or lithium iron phosphate (LFP), and develop recycling processes accordingly. Li-Cycle already processes some LFP batteries; in those instances it remakes the phosphate back into a fertilizer additive.

In this case, Kochhar said he hopes people see this partnership as a proof point for the economic and environmental case for electric vehicles.

“This should be one commercial example [. . .] that EV batteries will not go into a landfill,” he said. “They’re very valuable. The technology’s here to deal with that in an economically and environmentally friendly fashion.”

Coinsmart. Beste Bitcoin-Börse in Europa
Source: https://techcrunch.com/2021/05/11/gm-and-lg-chems-ultium-cells-partners-with-li-cycle-to-process-manufacturing-waste/

Continue Reading

Automotive

GM and LG Chem’s Ultium Cells partners with Li-Cycle to process manufacturing waste

Avatar

Published

on

Ultium Cells LLC, a joint venture between General Motors and LG Chem, has been steadily building up its battery cell manufacturing capacity in the U.S. since the venture was first announced in December 2019. But with each battery cell they produce, they’ll also produce waste – tricky-to-handle waste that also has too much inherent valuable to toss into a landfill.

Instead of throwing it away, Ultium is sending it to a recycler. The venture has executed an agreement with Canadian company Li-Cycle to recycle critical materials from the scrap produced from Ultium’s manufacturing processes from its Lordstown plant, starting later in 2020. The materials from the Lordstown location will be sent to Li-Cycle’s recycling location in Rochester, New York, to be processed and returned to the battery supply chain.

General Motors and LG Chem are clearly determined to scale their battery cell manufacturing. Around 5-10% of the output of a cell manufacturer is this excess scrap. Considering that the Lordstown facility will be capable of producing 30 gigawatt hours of capacity annually, it’s sure to produce a sizable amount of waste material. (For perspective, Tesla’s factory in Nevada has a 35 GW-hour capacity.)

Li-Cycle’s approach is different from more traditional recycling processes, co-founder Ajay Kochhar told TechCrunch. Traditional recycling use a pyrometallurgical, or high temperature, process. With this process, batteries go into a furnace and excess material, like plastics and the electrolyte, are burned off, leaving around a 50% recovery rate for the valuable raw materials.

Li-Cycle also differs from competitors like Redwood Materials, which also use high-temperature, Kochhar explained. Redwood processes things like consumer electronics, which requires different approaches. Li-cycle uses a hydrometallurgical process that shreds – actually shreds, like a paper shredder – the battery materials in a submerged, proprietary solution. Doing it this way reduces the thermal risk of a fire and recovers up to 95% of the battery materials (Redwood also claims a recovery rate of 95-98%). By not burning anything off, the company also avoids producing potentially toxic emissions, Kochhar said.

Shredded lithium-ion batteries. Image Credits: Li-Cycle (opens in a new window)

The cathode and anode material is converted into battery-grade chemicals, like lithium carbonate, nickel sulfate and cobalt sulfate. Li-Cycle works with a company Traxys, which buys the chemical material.

“And where it goes from there is back into cathode making and back into the broader economy and battery supply chain,” Kochhar said. The next step would be a “true circular economy closed loop” where the same material used by a manufacturer is returned back to it.

The company has two recycling “spokes,” where shredding and mechanical separation occurs, in Rochester and Ontario, Canada, with a third commercial facility being built in Arizona. Once the Arizona facility becomes operational, Li-Cycle will be able to process around 20,000 metric tons, or 4 gigawatt-hours, of lithium-ion batteries annually. It’s also building what it calls a “hub” to make the battery chemicals in Rochester, which will have an annual capacity to process around 60,000 metric tons of battery scrap and “black mass” (a mix of cathode and anode material, and one of the outputs from the company’s “spokes”).

It works with 14 different automotive and battery manufacturers (though not all of those deals are public), as well as auto dealers and auto recyclers to accept and process spent lithium-ion batteries.

Ultium in April announced a second $2.3 billion U.S.-based battery factory in Spring Hill, Tennessee that is due to open in 2023. Both factories will supply the automaker with the cells needed for the 30 electric vehicle models it plans to launch by mid decade. However, it is not known if Li-Cycle will process waste from this plant, too.

Notably, the company also recycles R&D scrap from various automakers, giving Li-Cycle “a kind of first look at what’s coming down the pipe” in terms of battery technology, Kochhar said. That helps the company stay on top of the newest battery chemistries and technologies, like solid-state or lithium iron phosphate (LFP), and develop recycling processes accordingly. Li-Cycle already processes some LFP batteries; in those instances it remakes the phosphate back into a fertilizer additive.

In this case, Kochhar said he hopes people see this partnership as a proof point for the economic and environmental case for electric vehicles.

“This should be one commercial example [. . .] that EV batteries will not go into a landfill,” he said. “They’re very valuable. The technology’s here to deal with that in an economically and environmentally friendly fashion.”

Coinsmart. Beste Bitcoin-Börse in Europa
Source: https://techcrunch.com/2021/05/11/gm-and-lg-chems-ultium-cells-partners-with-li-cycle-to-process-manufacturing-waste/

Continue Reading

Publications

BLOOMBERG GREEN: Beijing’s Olympic hurdle

Avatar

Published

on


When Beijing hosted the 2008 Summer Olympic Games, China was determined to welcome visitors from around the world with blue skies and fresh air. Authorities shut down or cut production at almost all the factories in and around the capital. The government launched measures to cut traffic congestion by half that are still in place today.

Operation “Olympic Blue” worked. The city notorious for its smog was transformed for an entire month. More than a decade later, China has to pull off the feat again when it hosts the winter games next year. This time might be more challenging.

President Xi Jinping has made cleaning up the environment a priority since he came to power in 2013. That’s included advancing the Blue Sky action plan, which sets air quality targets for each district in Beijing, and implementing measures to cut pollution. By the end of last year, coal stoves in 25 million households had been replaced with gas or electric. Tens of thousands of factories have been fined for exceeding their emissions limits since a government crackdown starting in 2017. The share of heavily polluted days experienced nationwide in 2020 was half that of 2015, falling in key regions including Beijing.

The Chinese government pledged in March to “basically eliminate” heavy pollution days by 2025, though progress remains patchy. A report this month by the Centre for Research on Energy and Clean Air (CREA) showed that more than 80 cities experienced five or more such days in 2020, in spite of pandemic lockdowns. Beijing is also behind on its air quality targets. In the first quarter of this year, the average concentration of deadly PM2.5 particles was 21% higher compared with the same period in 2019, according to CREA.

China’s post-pandemic recovery is driving the increase in emissions. Production of steel, cement and thermal power outpaced gross domestic product growth in the first quarter, CREA’s research showed, as the world’s second-biggest economy makes up for lost time. Earlier this year, the environment ministry found steel mills near Beijing that had been told to halt activity to lower pollution were operating illegally and had falsified production records.

There are two ways for China to cut pollution during the Olympics, said Lauri Myllyvirta, an analyst at CREA. The government could either continually cut emissions throughout the year, or shut factories and limit traffic during the Olympics like it did before. The latter way might seem easier in the short term, but sustained progress needs “a move away from coal and oil, as well as reduced reliance on the most polluting heavy industries, such as coal-based steelmaking,” he said.

The costs of abruptly shutting down industrial activity in 2008 may be too enormous to repeat.  The short notice caused the economy significant damage, according to Ma Jun, director of the Institute of Public & Environmental Affairs. China “faces a lot of pressure to keep the air good for the whole period of the games,” said Ma. “If gradual measures to reduce emissions and control air pollution fail to be implemented, then China would have to do the same thing it did the last time, which nobody wants to see.”

Hosting the games in the colder months rather than the summer also means contending with more challenging weather conditions and higher emissions from heating homes and offices.

And there’s a new uncertainty: dust storms. Last week, Beijing battled its fourth major sandstorm since March as strong winds blew in dust from desert areas to the north. Government officials and meteorologists attributed the events to overgrazing and mining in Mongolia, along with more extreme weather this spring including less rain and snow, frequently alternating warm and cold spells, and heavy winds.

“If the sandstorms are as bad next year, there’s nothing people can do to improve the situation immediately,” said Ma. “It’s important to protect the environment and fragile ecosystem on the Mongolian plain, but the good effects will take time.”

Like getting the Green Daily newsletter? Subscribe to Bloomberg.com for unlimited access to breaking news on climate and energy, data-driven reporting and graphics, Bloomberg Green magazine and more.

The fourth annual Bloomberg New Economy Forum will convene the world’s most influential leaders in Singapore this November 16-19, 2021 to mobilize behind the effort to build a sustainable and inclusive global economy. Learn more here.

Help us get better. Take this two-minute survey and tell us how we can improve this newsletter. 

Paid Post

Ready to Invest in the Green Economy?


Here’s what else you need to know in Green


BNP Paribas Urges Investors to Guide Lawmakers on Climate Policy

It wants to accelerate the transition to a low-carbon economy and meet the Paris Agreement obligations.


China Copper Smelters to Cut Concentrate Purchases in Green Push

That’s according to a state-run research firm.


Green Packaging Isn’t Good Enough Anymore

A growing segment of consumers want zero waste packaging options, from toiletries to cleaning products.

Coinsmart. Beste Bitcoin-Börse in Europa
Source: https://www.ethicalmarkets.com/bloomberg-green-beijings-olympic-hurdle/

Continue Reading

Publications

BLOOMBERG GREEN: Beijing’s Olympic hurdle

Avatar

Published

on


When Beijing hosted the 2008 Summer Olympic Games, China was determined to welcome visitors from around the world with blue skies and fresh air. Authorities shut down or cut production at almost all the factories in and around the capital. The government launched measures to cut traffic congestion by half that are still in place today.

Operation “Olympic Blue” worked. The city notorious for its smog was transformed for an entire month. More than a decade later, China has to pull off the feat again when it hosts the winter games next year. This time might be more challenging.

President Xi Jinping has made cleaning up the environment a priority since he came to power in 2013. That’s included advancing the Blue Sky action plan, which sets air quality targets for each district in Beijing, and implementing measures to cut pollution. By the end of last year, coal stoves in 25 million households had been replaced with gas or electric. Tens of thousands of factories have been fined for exceeding their emissions limits since a government crackdown starting in 2017. The share of heavily polluted days experienced nationwide in 2020 was half that of 2015, falling in key regions including Beijing.

The Chinese government pledged in March to “basically eliminate” heavy pollution days by 2025, though progress remains patchy. A report this month by the Centre for Research on Energy and Clean Air (CREA) showed that more than 80 cities experienced five or more such days in 2020, in spite of pandemic lockdowns. Beijing is also behind on its air quality targets. In the first quarter of this year, the average concentration of deadly PM2.5 particles was 21% higher compared with the same period in 2019, according to CREA.

China’s post-pandemic recovery is driving the increase in emissions. Production of steel, cement and thermal power outpaced gross domestic product growth in the first quarter, CREA’s research showed, as the world’s second-biggest economy makes up for lost time. Earlier this year, the environment ministry found steel mills near Beijing that had been told to halt activity to lower pollution were operating illegally and had falsified production records.

There are two ways for China to cut pollution during the Olympics, said Lauri Myllyvirta, an analyst at CREA. The government could either continually cut emissions throughout the year, or shut factories and limit traffic during the Olympics like it did before. The latter way might seem easier in the short term, but sustained progress needs “a move away from coal and oil, as well as reduced reliance on the most polluting heavy industries, such as coal-based steelmaking,” he said.

The costs of abruptly shutting down industrial activity in 2008 may be too enormous to repeat.  The short notice caused the economy significant damage, according to Ma Jun, director of the Institute of Public & Environmental Affairs. China “faces a lot of pressure to keep the air good for the whole period of the games,” said Ma. “If gradual measures to reduce emissions and control air pollution fail to be implemented, then China would have to do the same thing it did the last time, which nobody wants to see.”

Hosting the games in the colder months rather than the summer also means contending with more challenging weather conditions and higher emissions from heating homes and offices.

And there’s a new uncertainty: dust storms. Last week, Beijing battled its fourth major sandstorm since March as strong winds blew in dust from desert areas to the north. Government officials and meteorologists attributed the events to overgrazing and mining in Mongolia, along with more extreme weather this spring including less rain and snow, frequently alternating warm and cold spells, and heavy winds.

“If the sandstorms are as bad next year, there’s nothing people can do to improve the situation immediately,” said Ma. “It’s important to protect the environment and fragile ecosystem on the Mongolian plain, but the good effects will take time.”

Like getting the Green Daily newsletter? Subscribe to Bloomberg.com for unlimited access to breaking news on climate and energy, data-driven reporting and graphics, Bloomberg Green magazine and more.

The fourth annual Bloomberg New Economy Forum will convene the world’s most influential leaders in Singapore this November 16-19, 2021 to mobilize behind the effort to build a sustainable and inclusive global economy. Learn more here.

Help us get better. Take this two-minute survey and tell us how we can improve this newsletter. 

Paid Post

Ready to Invest in the Green Economy?


Here’s what else you need to know in Green


BNP Paribas Urges Investors to Guide Lawmakers on Climate Policy

It wants to accelerate the transition to a low-carbon economy and meet the Paris Agreement obligations.


China Copper Smelters to Cut Concentrate Purchases in Green Push

That’s according to a state-run research firm.


Green Packaging Isn’t Good Enough Anymore

A growing segment of consumers want zero waste packaging options, from toiletries to cleaning products.

Coinsmart. Beste Bitcoin-Börse in Europa
Source: https://www.ethicalmarkets.com/bloomberg-green-beijings-olympic-hurdle/

Continue Reading
PR Newswire4 days ago

Polystyrene Foam Market worth $32.2 billion by 2026 – Exclusive Report by MarketsandMarkets™

Cyber Security4 days ago

How to Become a Cryptographer: A Complete Career Guide

Blockchain3 days ago

Launch of Crypto Trading Team by Goldman Sachs

Aviation3 days ago

What Happened To Lufthansa’s Boeing 707 Aircraft?

AR/VR4 days ago

Apple is giving a laser company that builds some of its AR tech $410 million

Aviation2 days ago

JetBlue Hits Back At Eastern Airlines On Ecuador Flights

Cyber Security3 days ago

Cybersecurity Degrees in Massachusetts — Your Guide to Choosing a School

Cyber Security4 days ago

How To Unblock Gambling Websites?

Payments5 days ago

G20 TechSprint Initiative invites firm to tackle green finance

Ripple’s XRP Price
Blockchain4 days ago

Charted: Ripple (XRP) Turns Green, Here’s Why The Bulls Could Aim $2

Blockchain3 days ago

Miten tekoälyä käytetään videopeleissä ja mitä tulevaisuudessa on odotettavissa

Blockchain3 days ago

DOGE Co-founder Reveals the Reasons Behind its Price Rise

Blockchain4 days ago

South America’s Largest E-Commerce Company Adds $7.8M Worth of Bitcoin to its Balance Sheet

Blockchain4 days ago

Bitcoin Has No Existential Threats, Says Michael Saylor

Aviation3 days ago

United Airlines Uses The Crisis To Diversify Latin American Network

Cyber Security3 days ago

U.S. and the U.K. Published Attack on IT Management Company SolarWinds

Fintech3 days ago

The Spanish fintech Pecunpay strengthens its position as a leader in the issuance of corporate programs

Blockchain2 days ago

“Privacy is a ‘Privilege’ that Users Ought to Cherish”: Elena Nadoliksi

Blockchain4 days ago

Cardano (ADA) Staking Live on the US-Based Kraken Exchange

Private Equity4 days ago

This Dream Job Will Pay You to Gamble in Las Vegas on the Company’s Dime

Trending