Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Unattended install updates (#433)
Browse files Browse the repository at this point in the history
* Remove unnecessary '--sync' from 'plan execute' which was
ill-concieved.
* Move operation execute responsibility from Server to Executor. Factor
out event dispatching into a separate type and implement for both
use-cases - installer and install agent.
* Ensure proper execution of install steps on the agent.
* Add dispatcher tests. Fix a bug in buffered dispatcher with duplicate events
* Close dispatcher in executeConcurrentStep for all exit points
  • Loading branch information
a-palchikov authored and r0mant committed Jun 13, 2019
1 parent d345eed commit dfc549a
Show file tree
Hide file tree
Showing 22 changed files with 1,555 additions and 1,199 deletions.
2 changes: 1 addition & 1 deletion build.assets/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN (mkdir -p /opt/protoc && \
RUN cd ${GOPATH}/src/github.com/gogo/protobuf && git reset --hard ${GOGO_PROTO_TAG} && make install
RUN cd ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway && git reset --hard ${GRPC_GATEWAY_TAG} && go install ./protoc-gen-grpc-gateway

ENV PROTO_INCLUDE "/usr/local/include":"${GOPATH}/src":"${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis":"${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis":"${GOGOPROTO_ROOT}/protobuf"
ENV PROTO_INCLUDE "/usr/local/include":"${GOPATH}/src":"${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis":"${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis":"${GOGOPROTO_ROOT}/protobuf":"${GOGOPROTO_ROOT}/gogoproto"

# install DEP tool
RUN wget --quiet -O /usr/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 && chmod +x /usr/bin/dep
Expand Down
10 changes: 8 additions & 2 deletions lib/expand/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"github.com/gravitational/trace"
)

// bootstrap initializes the local peer data
func (p *Peer) bootstrap() error {
// init initializes the peer after a successful connect
func (p *Peer) init(ctx operationContext) error {
if err := p.clearLogins(); err != nil {
return trace.Wrap(err)
}
Expand All @@ -37,6 +37,12 @@ func (p *Peer) bootstrap() error {
if err := p.configureStateDirectory(); err != nil {
return trace.Wrap(err)
}
if err := p.ensureServiceUserAndBinary(ctx); err != nil {
return trace.Wrap(err)
}
if err := p.startAgent(ctx); err != nil {
return trace.Wrap(err)
}
return nil
}

Expand Down
Loading

0 comments on commit dfc549a

Please sign in to comment.