Skip to content
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

drop Golang from builds #405

Merged
merged 3 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions .github/workflows/kbs-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ jobs:
profile: minimal
toolchain: ${{ env.RUSTC_VERSION }}

- uses: actions/setup-go@v5
with:
go-version: stable

- name: Set up rust build cache
uses: actions/cache@v4
continue-on-error: false
Expand Down
12 changes: 3 additions & 9 deletions attestation-service/Dockerfile.as-grpc
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ FROM rust:latest as builder
WORKDIR /usr/src/attestation-service
COPY . .

# Install golang
RUN wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz

ENV PATH="/usr/local/go/bin:${PATH}"

# Install TPM Build Dependencies
RUN apt-get update && apt-get install -y protobuf-compiler clang libtss2-dev

# Install TDX Build Dependencies
RUN curl -L https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | tee intel-sgx-deb.key | apt-key add - && \
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | tee /etc/apt/sources.list.d/intel-sgx.list && \
apt-get update && apt-get install -y libtdx-attest-dev libsgx-dcap-quote-verify-dev
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main' | tee /etc/apt/sources.list.d/intel-sgx.list && \
apt-get update && apt-get install -y libsgx-dcap-quote-verify-dev

# Build and Install gRPC attestation-service
RUN cargo install --path attestation-service/attestation-service --bin grpc-as --features grpc-bin --locked
Expand All @@ -34,7 +28,7 @@ RUN apt-get update && apt-get install curl gnupg openssl -y && \
rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

RUN curl -L https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | tee intel-sgx-deb.key | apt-key add - && \
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | tee /etc/apt/sources.list.d/intel-sgx.list && \
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main' | tee /etc/apt/sources.list.d/intel-sgx.list && \
apt-get update && \
apt-get install -y libsgx-dcap-default-qpl libsgx-dcap-quote-verify && \
rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
Expand Down
12 changes: 3 additions & 9 deletions attestation-service/Dockerfile.as-restful
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ FROM rust:latest as builder
WORKDIR /usr/src/attestation-service
COPY . .

# Install golang
RUN wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz

ENV PATH="/usr/local/go/bin:${PATH}"

# Install TPM Build Dependencies
RUN apt-get update && apt-get install -y protobuf-compiler clang libtss2-dev

# Install TDX Build Dependencies
RUN curl -L https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | tee intel-sgx-deb.key | apt-key add - && \
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | tee /etc/apt/sources.list.d/intel-sgx.list && \
apt-get update && apt-get install -y libtdx-attest-dev libsgx-dcap-quote-verify-dev
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main' | tee /etc/apt/sources.list.d/intel-sgx.list && \
apt-get update && apt-get install -y libsgx-dcap-quote-verify-dev

# Build and Install RESTful attestation-service
RUN cargo install --path attestation-service/attestation-service --bin restful-as --features restful-bin --locked
Expand All @@ -33,7 +27,7 @@ RUN apt-get update && apt-get install curl gnupg openssl -y && \
rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

RUN curl -L https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | tee intel-sgx-deb.key | apt-key add - && \
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | tee /etc/apt/sources.list.d/intel-sgx.list && \
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main' | tee /etc/apt/sources.list.d/intel-sgx.list && \
apt-get update && \
apt-get install -y libsgx-dcap-default-qpl libsgx-dcap-quote-verify && \
rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
Expand Down
1 change: 0 additions & 1 deletion attestation-service/tests/e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ install-dependencies:
protobuf-compiler \
clang \
libtss2-dev \
libtdx-attest-dev \
libsgx-dcap-quote-verify-dev \
libsgx-dcap-default-qpl

Expand Down
6 changes: 1 addition & 5 deletions kbs/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && \

RUN curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | \
gpg --dearmor --output /usr/share/keyrings/intel-sgx.gpg && \
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | \
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main' | \
tee /etc/apt/sources.list.d/intel-sgx.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
Expand All @@ -29,10 +29,6 @@ RUN curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.k
libsgx-dcap-quote-verify-dev \
libtdx-attest-dev

RUN wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"

# Build and Install KBS
WORKDIR /usr/src/kbs
COPY . .
Expand Down
6 changes: 1 addition & 5 deletions kbs/docker/Dockerfile.coco-as-grpc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ FROM rust:latest as builder
WORKDIR /usr/src/kbs
COPY . .

RUN apt-get update && apt install -y protobuf-compiler wget git

RUN wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
RUN apt-get update && apt install -y protobuf-compiler git

# Build and Install KBS
RUN cargo install --path kbs/src/kbs --no-default-features --features coco-as-grpc,resource,opa,rustls
Expand Down
8 changes: 1 addition & 7 deletions kbs/docker/Dockerfile.intel-trust-authority
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ FROM rust:latest as builder
WORKDIR /usr/src/kbs
COPY . .

RUN apt-get update && apt install -y wget git

RUN wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
RUN apt-get update && apt install -y git

# Build and Install KBS
RUN cargo install --path kbs/src/kbs --no-default-features --features intel-trust-authority-as,rustls,resource,opa
Expand All @@ -18,6 +14,4 @@ LABEL org.opencontainers.image.source="https://github.com/confidential-container

RUN apt update && apt install -y ca-certificates

COPY --from=builder /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.1
COPY --from=builder /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
COPY --from=builder /usr/local/cargo/bin/kbs /usr/local/bin/kbs
7 changes: 0 additions & 7 deletions kbs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ curl https://sh.rustup.rs -sSf | sh
source "$HOME/.cargo/env"
```

In order to compile some Go components (e.g. the OPA policy engine), install
the Go compiler (>= 1.20):
```shell
sudo apt-get install -y golang-1.20
export PATH=/usr/lib/go-1.20/bin:$PATH
```

Install dependencies:
```shell
curl -L "https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key" | sudo apt-key add -
Expand Down
Loading