8000 feat: Pi for stargate by faddat · Pull Request #627 · ignite/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Pi for stargate #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0e9f39c
mage gennration for stargate chains.
faddat Jan 6, 2021
90ac5b7
mage gennration for stargate chains.
faddat Jan 6, 2021
e422259
update build system
faddat Jan 7, 2021
23b7195
Update generated readmes with docker hub info, fix pi images.
faddat Jan 7, 2021
9df5fd8
OrgName -> OwnerName
faddat Jan 7, 2021
afcc18c
Update image tag in pi build process.
faddat Jan 7, 2021
c48cac4
Merge branch 'develop' of https://github.com/tendermint/starport into…
faddat Jan 7, 2021
4356759
Consolidated Dockerfile, distroless image, only push on deevelop branch
faddat Jan 8, 2021
d7ce9a2
remove "only"
faddat Jan 8, 2021
23f099d
Merge https://github.com/tendermint/starport into sos-lite
faddat Jan 8, 2021
8ff2cce
remove excess
faddat Jan 8, 2021
f34883e
remove dependency from devices.yml
faddat Jan 8, 2021
00ad6fe
Update Dockerfile
faddat Jan 9, 2021
5c86fb7
Update Dockerfile.plush
faddat Jan 9, 2021
7864d42
Old templates removed.
faddat Jan 9, 2021
58df06b
Merge branch 'sos-lite' of https://github.com/tendermint/starport int…
faddat Jan 9, 2021
8000
e76e6e3
docker compose and zerotier
faddat Jan 9, 2021
3d000f3
dockerfiles for better automation of scaffolded chains w/ no docker d…
faddat Jan 9, 2021
32f532e
downstream ci: build UI containers
faddat Jan 9, 2021
e1db561
Restore package-lock.json to develop branch state.
faddat Jan 9, 2021
378e77e
update changelog
faddat Jan 9, 2021
f79ad61
Expose ports in the starport dockerfile
faddat Jan 10, 2021
0c49784
restore package lock
faddat Jan 11, 2021
dcccafe
Merge branch 'sos-lite' of https://github.com/tendermint/starport int…
faddat Jan 11, 2021
07f7624
pacman --noconfirm
faddat Jan 11, 2021
344d753
build ui in ./vue context
faddat Jan 11, 2021
268c8d1
Merge branch 'develop' of https://github.com/tendermint/starport into…
faddat Jan 11, 2021
fb6451b
Update Dockerfile so that it is no longer distroless because users ma…
faddat Jan 14, 2021
3a8cec5
Merge branch 'develop' of https://github.com/tendermint/starport into…
faddat Jan 15, 2021
71651d3
Merge branch 'develop' of https://github.com/tendermint/starport into…
faddat Jan 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .docker/Dockerfile.amd64

This file was deleted.

8 changes: 0 additions & 8 deletions .docker/Dockerfile.arm64

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,9 @@ name: Rpi
on: [push, pull_request]

jobs:
amd64:
name: amd64 docker
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: Set up QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/starport --file .docker/Dockerfile.amd64 --platform linux/amd64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/starport:amd64cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/starport:amd64cache --push --progress tty .

arm64:
name: arm64 docker
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: Set up QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/starport --file .docker/Dockerfile.arm64 --platform linux/arm64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/starport:cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/starport:cache --push --progress tty .

pi:
name: Starport Pi
runs-on: ubuntu-latest
needs: arm64
steps:
- name: checkout
uses: actions/checkout@v2
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/docker-push.yml
6DB6
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow makes a 64 bit Raspberry Pi Arch Linux Image.
# It does not have the security issues mentioned here: https://github.com/tendermint/tendermint/blob/master/docs/tendermint-core/running-in-production.md#validator-signing-on-32-bit-architectures-or-arm
# Later, more devices will be supported, as well.
# The "base" is built by: https://github.com/faddat/sos
# The base image is located at: https://hub.docker.com/r/faddat/spos

name: Docker
on:
push:
branches:
- develop

jobs:
docker:
name: Starport Docker Image
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: Set up QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/starport --platform linux/arm64,linux/amd64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/starport:cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/starport:cache --push --progress tty .
29 changes: 29 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Builds the starrport DDocker image as a test, but does not push it.

name: Docker
on:
push:
branches:
- '*'
- '!master'
pull_request:

jobs:
docker:
name: Starport Docker Image
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: Set up QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest

- name: Build
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/starport --platform linux/arm64,linux/amd64 --progress tty .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
.DS_Store
apps/
.idea
.vscode
2 changes: 1 addition & 1 deletion .pi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ RUN useradd --create-home starport && \


# later, update to tendermint/starport
COPY --from=tendermintdevelopment/starport:arm64 /starport/build/starport /usr/bin/starport
COPY --from=tendermintdevelopment/starport /starport/build/starport /usr/bin/starport
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Build inside lopsided/archlinux for multiplatform support
# It's an arch linux image with support for both ARM64 and AMD64
FROM lopsided/archlinux


# GOPATH AND GOBIN ON PATH
ENV GOPATH=/go
ENV PATH=$PATH:/go/bin

# INSTALL DEPENDENCIES
RUN pacman -Syyu --noconfirm go npm make git which && \
mkdir /go

# COPY STARPORT SOURCE CODE INTO CONTAINER
COPY . /starport
WORKDIR /starport

# INSTALL STARPORT
RUN PATH=$PATH:/go/bin && \
bash scripts/install

# CMD
CMD ["/go/bin/starport"]

# WE NEED BOTH NODE AND GO, DISTROLESS IS NOT THE WAY HERE. REVISIT LATER.
# Copy into a distroless image so that ONLY the starport binary remains
# FROM gcr.io/distroless/base
# COPY --from=builder /starport/build/starport /

# EXPOSE 12345
# EXPOSE 8080
# EXPOSE 1317
# EXPOSE 26656
# EXPOSE 26657

# CMD ["/starport"]
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

### Features:
- Distroless multiplatform docker containers for starport that can be used for `starport serve`
- UI containers for chains scaffolded with Starport
- Use SOS-lite and Docker instead of systemD

### Fixes:
- use docker buildx as a single command with multiple platforms to make multi-manifest work properly

## `v0.13.0`

### Features:
Expand Down
52 changes: 10 additions & 42 deletions starport/templates/app/launchpad/.github/workflows/build.yml.plush
Original file line number Diff line number Diff line change
Expand Up @@ -8,73 +8,41 @@ on: [push, pull_request]

# This workflow makes x86_64 binaries for mac, windows, and linux.


jobs:
mac-windows:
build:
runs-on: ubuntu-latest
strategy:
matrix:
targetos: [windows, darwin]
name: <%= AppName %> for ${{ matrix.targetos }}
arch: [amd64, arm64]
targetos: [windows, darwin, linux]
name: <%= AppName %> ${{ matrix.arch }} for ${{ matrix.targetos }}
steps:
- uses: actions/checkout@v2

- name: Setup go
uses: actions/setup-go@v1
with:
go-version: 1.15
env:
GOOS: ${{ matrix.targetos }}

- name: Compile
run: |
cd cmd/<%= AppName %>d
go build .
cd ..
cd <%= AppName %>cli
go build .

- uses: actions/upload-artifact@v2
with:
name: <%= AppName %>cli ${{ matrix.targetos }}
path: cmd/<%= AppName %>cli/<%= AppName %>cli

- uses: actions/upload-artifact@v2
with:
name: <%= AppName %>d ${{ matrix.targetos }}
path: cmd/<%= AppName %>d/<%= AppName %>d

linux:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [arm64, riscv64, amd64]

name: <%= AppName %> for ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2

- name: Setup go
uses: actions/setup-go@v1
with:
go-version: 1.15
env:
GOARCH: ${{ matrix.arch }}

- name: Compile
run: |
go mod download
cd cmd/<%= AppName %>d
go build .
cd ..
cd <%= AppName %>cli
go build .

- uses: actions/upload-artifact@v2

- uses: actions/upload-artifact@v2
with:
name: <%= AppName %>cli ${{ matrix.arch }}
name: <%= AppName %>cli ${{ matrix.targetos }} ${{ matrix.arch }}
path: cmd/<%= AppName %>cli/<%= AppName %>cli

- uses: actions/upload-artifact@v2
with:
name: <%= AppName %>d ${{ matrix.arch }}
name: <%= AppName %>d ${{ matrix.targetos }} ${{ matrix.arch }}
path: cmd/<%= AppName %>d/<%= AppName %>d

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker
on: [push, pull_request]

jobs:
amd64:
name: <%= AppName %> Docker
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: Set up QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/<%= AppName %> --file Dockerfile --platform linux/amd64,linux/arm64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/<%= AppName %>:cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/<%= AppName %>:cache --push --progress tty .

- name: Build and push UI
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/<%= AppName %>-ui --file vue/Dockerfile --platform linux/amd64,linux/arm64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/<%= AppName %>-ui:cache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/<%= AppName %>-ui:cache --push --progress tty ./vue
Loading
0