curl http://localhost:7750/pulsar-manager/csrf-token
curl \
-H "X-XSRF-TOKEN: 568e7b50-2251-492d-b0e0-30ff1bd312c0" \
-H "Cookie: XSRF-TOKEN=568e7b50-2251-492d-b0e0-30ff1bd312c0;" \
-H 'Content-Type: application/json' \
-X PUT http://localhost:7750/pulsar-manager/users/superuser \
-d '{"name": "pulsar", "password": "pulsar", "description": "test", "email": "username@test.org"}'
로 접속 가능.
sed -i -e 's/\r$//' bkenv.sh
sed -i -e 's/\r$//' pulsar_env.sh
sed -i -e 's/\r$//' pulsar_tools_env.sh
window docker 에서 파일 줄 바꿈 해결
- cmake 설치 path 설정 (환경변수)
https://cmake.org/ - vcpkg 설치 path 설정 (환경변수)
https://vcpkg.io/en/getting-started.html - 비쥬얼 베이직 tools 설치 (windows 10 sdk 설치)
https://visualstudio.microsoft.com/ko/downloads/ - https://ko.osdn.net/projects/mingw/ 설치
- cpp 설치 및 컴파일
https://pulsar.apache.org/docs/en/client-libraries-cpp/
c:\ 기준으로 설치하였음.
git clone https://github.com/apache/pulsar
cd pulsar/pulsar-client-cpp
vcpkg install --feature-flags=manifests --triplet x64-windows
cmake -A x64 -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF -DVCPKG_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -S .
cmake --build ./ --config Release
- pulsar node 설치
https://pulsar.apache.org/docs/en/client-libraries-node/
https://github.com/apache/pulsar-client-node
cd c:\dev\project\
set PULSAR_CPP_DIR=C:\pulsar\pulsar-client-cpp
set OS_ARCH=x64-windows
글로벌 저장
setx PULSAR_CPP_DIR "C:\pulsar\pulsar-client-cpp"
setx OS_ARCH "x64-windows"
npm install pulsar-client
드디어… 설치하였다.. 진짜 거의 3시간만에 설치했음.. ㅡㅡ;;
정말 안되면, 내 컴퓨터 환경 변수에서 설정하면 됨.
번외. 도커로 pulsar 서버 설치하기
https://alpha2phi.medium.com/apache-pulsar-development-setup-bbdc82314cf
번외. pulsar 매니저 설치해서 사용하기
https://github.com/apache/pulsar-manager
매니저 사용할때에, 문제
매니저가 localhost:8080 으로 호출해서 발생하는 문제가 있는데,
이걸 docker host로 바꿔줘야한다.
./bin/pulsar-admin clusters get standalone
{
"serviceUrl" : "http://pulsar.localhost:8080",
"brokerServiceUrl" : "pulsar://pulsar.localhost:6650",
"brokerClientTlsEnabled" : false,
"tlsAllowInsecureConnection" : false,
"brokerClientTlsEnabledWithKeyStore" : false,
"brokerClientTlsTrustStoreType" : "JKS"
}
standalone.conf 열어서
# Hostname or IP address the service advertises to the outside world. If not set, the value of InetAddress.getLocalHost().getHostName() is used.
advertisedAddress=pulsar.localhost
이곳을 수정해주면 된다.
./bin/pulsar-admin clusters get pulsar-cluster
위 명령어는 클러스터일때인듯,